title: Panic running async code while dropping Rust Future
body: <p>I have an app using <code>#[tokio::main]</code>, that creates several resources on AWS in one of its tasks. I've implemented cleaning up those resources in <code>Drop</code> handlers. However those cleanup functions are async, so I am using <code>block_on</code> to ensure they run synchronously before returning from <code>drop</code>.</p>
  
  <pre><code>use futures::executor::block_on;
  
  struct EventQueue(pub String);
  
  impl Drop for EventQueue {
      fn drop(&amp;mut self) {
          block_on(delete_queue(&amp;self.0))
      }
  }
  
  pub async fn delete_queue(queue_url: &amp;str) {
      let sqs = rusoto_sqs::SqsClient::new(REGION);
      sqs.delete_queue(DeleteQueueRequest {
          queue_url: queue_url.to_string(),
      })
      .await
      .unwrap();
  }
  </code></pre>
  
  <p>The <code>main</code> function doesn't return until a <code>signal::ctrl_c().await.unwrap();</code> completes, after which I think the Tokio runtime is dropped, and the spawned tasks are cancelled. I believe the interaction with <code>block_on</code> is failing because the runtime is no longer usable.</p>
  
  <p>Here's the <a href="https://gist.github.com/anacrolix/8aebc5e87f245dc77aa999930418f28c" rel="nofollow noreferrer">panic output</a>.</p>