5a41bb32dd
Rust Binder cleanup is reworked to match the order in which C Binder cleans up things. A few notes on the changes: * Actually dropping thread objects is done at the very end because they contain a call to synchronize_rcu() which is slow. This ensures that death notifications are sent without waiting for those calls. This avoids failures in rustBinderTest. (The test is already flaky, but this extra sleep makes the flake much more likely to happen.) * We now free refs on remote nodes in release explicitly. Previously that only happened implicitly when everything keeping the ref alive has been dropped. To avoid spurious warnings from this, the warning print about dropping a ref that doesn't exist is only printed if the process is alive. Bug: 431914626 Change-Id: I3d1f4f15ffac7587d1bb0113a41330b2aea69b3d Signed-off-by: Alice Ryhl <aliceryhl@google.com>