Open
Description
Not sure if this is a bug or only not mentioned in the documentation. The following code,
let mut pool = LocalPool::new();
let mut spawner = pool.spawner();
let f = async {
println!("first");
3
};
let handle = spawner.spawn_with_handle(f).unwrap();
//drop(handle);
println!("Start run");
pool.run();
as expected, outputs:
Start run
first
If the line drop(handle)
is uncommented, f
is not executed anymore and only he following output is produced:
Start run