Module leak_playground_std::thread

source ·
Expand description

Possible std::thread additions. Contains examples.

§Examples

Static JoinGuard self ownership

use leak_playground_std::*;
let (tx, rx) = sync::mpsc::rendezvous_channel();
let thrd = thread::spawn_scoped(move || {
    let _this_thread = rx.recv().unwrap();
});
tx.send(thrd).unwrap();

Structs§

  • Handle to a thread, which joins on drop.

Functions§