crosvm/cros_async
Frederick Mayle 2ee0885695 cros_async: TaskHandle abstraction + new detach semantics
`Task::detach` can be dangerous, e.g. in combination with `BlockingPool`
it can cause leaks.

This commit adds a `TaskHandle` type to replace `Task` in the cros_async
API. It is essentially the same thing, except that the `detach` method
simply moves the underlying `Task` into the `RawExecutor` so that when
the `RawExecutor` is dropped, we will also drop the `Task`s.

BUG=b:270986145

Change-Id: I727deb1f9f615aa222952dea1fee4a1c0e443fde
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4294679
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-03-07 18:33:34 +00:00
..
src cros_async: TaskHandle abstraction + new detach semantics 2023-03-07 18:33:34 +00:00
Cargo.toml