fibers_global
The global executor of fibers
.
This crate provides the global ThreadPoolExecutor
that enables to spawn/execute fibers anywhere in a program.
This is useful for briefly writing test or example code that use fibers
.
Examples
use oneshot;
use ;
// Spawns two auxiliary fibers.
let = channel;
let = channel;
spawn;
spawn;
// Executes a calculation that depends on the above fibers.
let result = execute;
assert_eq!;