Closed
Description
When using the curent-thread
runtime, the tokio_threadpool::blocking()
function is not available, which is currently a requirement for tokio-fs
to
to run blocking filesystem operations.
Note that tokio-current-thread
cannot implement a function equivalent to
tokio_threadpool::blocking()
because futures in this single-threaded
executor are not necessarily Send
. That means we cannot start executing
the blocking function on the current thread and move the event loop onto a
new thread.
Blocking filesystem operations therefore must be run on a thread different
from the current one. Still, the solution to this problem is not as easy as
"just" spawning blocking operations onto a different thread.
Metadata
Metadata
Assignees
Labels
No labels