mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
1e9974ff3e
This is like future::task::ArcWake but uses Weak<T> instead of Arc<T>. This prevents a circular reference where the RunnableQueue would hold an active reference to the executor (via its waker) while the executor owned the RunnableQueue, leading to memory leaks. With this the executor should only be using weak references internally and the only strong references should be in the public *Executor type. Also fix the tests that were broken by this change. BUG=none TEST=unit tests Change-Id: I3e9c007d533e154b2ad9d1e4d56a692f65da6aa0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2643841 Reviewed-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Noah Gold <nkgold@google.com> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org> Tested-by: Chirantan Ekbote <chirantan@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_skip | ||
Cargo.toml |