thread_num

Function thread_num 

Source
pub fn thread_num() -> usize
Expand description

Get number of threads of current mioco instance.

Get number of threads of the Mioco instance that the current coroutine is running in.

This is useful eg. for load balancing: spawning as many coroutines as there is handling threads that can run them.