Workaround for pubsub example hanging.

The publisher client isn't being dropped when the async fn returns. It
could potentially be something strange in the ThreadPool executor.
This commit is contained in:
Tim Kuehn
2019-12-07 22:01:37 -08:00
parent 917c0c5e2d
commit 45af6ccdeb

View File

@@ -186,6 +186,7 @@ async fn main() -> io::Result<()> {
publisher
.broadcast(context::current(), "hi again".to_string())
.await?;
drop(publisher);
tokio::time::delay_for(Duration::from_millis(100)).await;
println!("Done.");