title: Blocking in Dispose method
body: <p>Can blocking in <code>Dispose()</code> method (synchronous variant) <strong>anyhow</strong> influence GC process?</p>
  <p>Supposing:</p>
  <ul>
  <li>classes with no explicit finalizers,</li>
  <li>no real resource allocation/freeing within <code>Dispose</code>, just abusing the pattern to inject some code at the point of <code>Dispose</code> call</li>
  </ul>
  <ol>
  <li>Up to now, I understood <code>Dispose</code> as a &quot;normal&quot; method, which also could &quot;accidentally&quot; be called by compiler generated code from some syntactic sugar constructs, like <code>using (var i = new Something(...)){}</code> or <code>using var i = new Something(...)</code> and if <code>using</code> is not suitable for us (from any reason), we just call it directly;</li>
  <li>This implies, any blocking operation inside means only delay at the point of <code>Dispose</code> execution, right?</li>
  <li>This implies, GC does not care about <code>Dispose</code> at all and just collects any instance, when there are no references to it, regardless of <code>Dispose</code> being called or not, right?</li>
  <li>From above I imply that under mentioned conditions, there is no reason for any memory leak nor GC influence, when working with instances blocking in Dispose, right?</li>
  </ol>
  <p>Example of such class:</p>
  <pre><code>class DisposeBlocker : IDisposable
  {
      private Task localWork;
      private Task remoteWork;
      ...
      DisposeBlocker(Task work)
      {
          remoteWork = work;
      }
  
      void Dispose()
      {
          for (var i = 0; i &lt; 1000000; ++i) {} // CPU Bound
          Thread.Sleep(1000); // Should be ok too, right?
          Task.Delay(1000).GetAwaiter().GetResult(); // Is this still ok? Thread pools, contexts, similar stuff...
          Task.WhenAll(localWork, remoteWork).GetAwaiter().GetResult(); // Same as the previous one, right?
      }
  }
  </code></pre>