mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00: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:
parent
304914b707
commit
42a0a10294
@ -203,7 +203,9 @@ impl Loop {
|
|||||||
// process the whole queue of messages.
|
// process the whole queue of messages.
|
||||||
if token == 0 {
|
if token == 0 {
|
||||||
debug!("consuming notification queue");
|
debug!("consuming notification queue");
|
||||||
|
CURRENT_LOOP.set(&self, || {
|
||||||
self.consume_queue();
|
self.consume_queue();
|
||||||
|
});
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user