The current thread v0.1.0
Its identifier, giving way to other threads, and how many can run at once.
CurrentId
pub func CurrentId() -> uint64
The calling thread's system-wide identifier. No two live threads share one, but the system may give a finished thread's identifier to a new thread.
Returns: the identifier
Yield
pub func Yield()
Offers the processor to another thread that is ready to run, and returns when this one is scheduled again. A hint for code that waits on another thread, not a way to order threads.
AvailableParallelism
pub func AvailableParallelism() -> uint
How many threads can usefully run at once: the number of processors online, and at least one. The answer can change while a program runs, as processors go online or offline.
Returns: the number of processors, never zero