Closed
Description
jld mentioned on IRC that it would be bad if a blocking IO system call blocked the entire rust scheduler thread, so that it couldn't schedule other threads in the meantime.
It would be useful to have a library which wraps blocking IO calls with a call to task::task().sched_mode(manual_threads(1)).spawn
so that when the kernel blocks that thread rust can schedule other threads on the existing scheduler. (The calling task would block on the exit+response of the 1:1-threaded task.)
An interesting researchy/heuristic problem part of this would be figuring out when it would be more expensive to create the new scheduler thread than to just call and block directly.