#Rustlang async-std TIL! Spawned tasks default to panic=abort, which doesn't work with #[should_panic] tests or catch.
Threads, OTOH, raise the panic at the site of .join() so we can catch them. They don't force a root panic/abort.
The difference makes porting to tasks tricky.
-
-
Gotcha. In my case, we're running pretty expensive computational tasks in parallel and a process abort makes life... difficult. Will follow this closely. To discord!
-
At which magnitude are you doing this? I wonder if it weren't better and easier to use a proper threadpool in that case. I don't know of a good `.await`-able one, currently, but it's super easy to wrap existing ones. rayon is perhaps a bit much, but maybe...
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
