Skip to main content

Module thread

Module thread 

Source
Expand description

Native threads.

Functionsยง

available_parallelism
Returns an estimate of the default amount of parallelism a program should use.
exit
Exits the current thread.
sleep
Current thread is going to sleep for the given duration.
sleep_until
Current thread is going to sleep, it will be woken up at the given deadline.
yield_now
Current thread gives up the CPU time voluntarily, and switches to another ready thread.