[][src]Crate lelet

Dynamic task executor.

Inspired by golang runtime.

It is okay to do blocking inside a task, the executor will detect this, and scale the thread pool.

But, please keep note that every time you do blocking, it will create thread via thread::spawn, and the number of thread you can create is not unlimited, so the number of blocking task you can spawn is also not unlimited

Structs

JoinHandle

Handle that you can await for

Functions

block_on

Block current thread until f is complete

get_num_cpus

Get the number of executor thread

set_num_cpus

Set the number of executor thread

spawn

Run the task in the background.