Function mioco::thread_num [] [src]

pub fn thread_num() -> usize

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.