2 ms·
Here's something not contrived that does pretty frequently come up [1] The gist of it is even though tasks can be somewhat guaranteed to live only for the scop
by cogman10 2y ago
Here's something not contrived that does pretty frequently come up [1]
The gist of it is even though tasks can be somewhat guaranteed to live only for the scope of the current method, you can't guarantee that with the rust type system. The end result is needing to copy immutable data or use ARC needlessly.
It's annoying enough that the language added "scoped_threads" which work great, but can't be translated into rust async tasks.
[1] https://without.boats/blog/the-scoped-task-trilemma/ https://without.boats/blog/the-scoped-task-trilemma/