mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-21 00:00:10 +02:00
Set the CURRENT_LOOP for processing messages
This ensures that timeouts and callbacks are run with the TLS var set
This commit is contained in:
+3
-1
@@ -203,7 +203,9 @@ impl Loop {
|
||||
// process the whole queue of messages.
|
||||
if token == 0 {
|
||||
debug!("consuming notification queue");
|
||||
self.consume_queue();
|
||||
CURRENT_LOOP.set(&self, || {
|
||||
self.consume_queue();
|
||||
});
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user