Tokio spawned tasks can't borrow self because they may cross threads. This means a direct update from inside the task is impossible. However, awaiting the task's completion means we block the thread, causing problems for the other requests.
This might require another message type to allow the updating of the topology as a kind of callback.
Tokio spawned tasks can't borrow
self
because they may cross threads. This means a direct update from inside the task is impossible. However, awaiting the task's completion means we block the thread, causing problems for the other requests.This might require another message type to allow the updating of the topology as a kind of callback.