3 ms·
Destructors don't seem to be the best place to implement cancellation for async functions: Rust async is going through a phase where the community is realizing
by kprotty 3y ago
Destructors don't seem to be the best place to implement cancellation for async functions: Rust async is going through a phase where the community is realizing it would be nice to have async destructors or non-cancellable async functions to avoid introducing unnecessary overhead like concurrent reclamation, reference counting, and dynamically allocated memory for things that would otherwise be done statically using structured concurrency.