title: Deadlock problem of VB using Minio delete API
body: <p><strong>version</strong></p>
  <ul>
  <li>.net framework 4.8</li>
  <li>MinIO 4.0.0</li>
  </ul>
  <p><strong>project</strong></p>
  <ul>
  <li>Web project based on VB</li>
  </ul>
  <p><strong>problem</strong></p>
  <ul>
  <li><p>Using Minio API RemoveObjectAsync() will not deadlock the <em><strong>first time</strong></em>（This first time refers to the first click of the button after opening vs2019 and starting the project）,
  and will be locked the second time. <strong>Why is it locked the second time</strong>?I guess the reason for the deadlock is that there is an await in the Minio source code that is not configured with configawait (false), but in this case, clicking button for the first time should also deadlock.</p>
  </li>
  <li><p><strong>My biggest doubt is why I can do it the first time and can't do it
  the second time</strong></p>
  <pre><code> Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       'clsMinIO is util class,DeleteObjectFromMinIO is Shared method
       If clsMinIO.DeleteObjectFromMinIO(&quot;/abc/test.jpg&quot;) Then
           Response.Write(&quot;success&quot;)
       End If
   End Sub                                                                              
   'class clsMinIO                                                                                                                                                
   Public Shared Function DeleteObjectFromMinIO(ByVal fileFullName As String) As Boolean                                                     
       Return DeleteObjectFromMinIOAsync(fileFullName).GetAwaiter().GetResult()         
   End Function
   Public Shared Async Function DeleteObjectFromMinIOAsync(ByVal fileFullName As String) As Task(Of Boolean)
       Try
           Dim removeArg = New RemoveObjectArgs().WithBucket(m_BucketName).WithObject(fileFullName)
  
           '========
           Await m_MinIOCn.RemoveObjectAsync(removeArg).ConfigureAwait(False) 
           '======== 
  
           Return True
       Catch ex As Exception
           Return False
       End Try
   End Function
  </code></pre>
  </li>
  </ul>
  <p><strong>MinIO Source code</strong></p>
  <pre><code> public async Task RemoveObjectAsync(RemoveObjectArgs args, CancellationToken cancellationToken = default(CancellationToken))
      {
          args.Validate();
          HttpRequestMessageBuilder requestMessageBuilder = await this.CreateRequest(args).ConfigureAwait(false);
          var restResponse = await this.ExecuteTaskAsync(this.NoErrorHandlers, requestMessageBuilder, cancellationToken);
      }
  </code></pre>
  <p><strong>My solution</strong></p>
  <pre><code>        Dim result = Task.Run(Async Function()
                                    Try
                                        Await clsMinIO.RemoveObjectAsync(removeArg).ConfigureAwait(False)
                                        Return True
                                    Catch ex As Exception
                                        Return False
                                    End Try
                                End Function).GetAwaiter().GetResult()
  </code></pre>