Skip to main content

Module thread

Module thread 

Source
Expand description

The threads mln-rs starts, and the waits for them to end.

A runtime or a render session owns library threads, which spawn starts, and a Joined waits for one to end when it drops on a host’s thread. On a library thread it doesn’t wait, since the thread it would wait for could be waiting for this one: it leaves it to end alone.

Structs§

Joined
A library thread that ends by itself once its owner lets go of it, which this waits for when it drops on a host’s thread, unless it was detached. On a library thread, whose locals are still there, the drop leaves the thread to end alone.

Functions§

builder
A builder for a thread named name with a STACK_SIZE stack. It isn’t a library thread: a Joined that drops on it waits, so a thread that a runtime’s or a session’s work may wait for starts with spawn.
spawn
Starts a library thread named name, with a STACK_SIZE stack, that runs work.