Closed nihiluis closed 7 years ago
Is it possible to just execute the closure without blocking the thread waiting for it (like thread::spawn)?
cutting this essentially
for num in coro { println!("{}", num.unwrap()); }
Well, what you want is a coroutine scheduler. Check this out.
coroutines are kinda sad in rust.
Yes. It is said. But C# style yield is going to be merged in nightly. So .. well, at least we have stackless coroutines
Is it possible to just execute the closure without blocking the thread waiting for it (like thread::spawn)?
cutting this essentially