Commit e3c8fe1
[roll] Roll fuchsia [fuchsia-async] Remove WeakScopeRef, Join::detach()
As the documentation explains, the type is unnecessary because it can't
be used to create cycles that didn't already exist. A ScopeRef can be
held by a user's task code, but each Task already holds a ScopeRef, so
it would just be redundant.
WeakScopeRef does prevent cycles in the internal ownership graph.
Testing this also exposed a flaw in the Join API. The intention was to
allow cancelling or detaching after polling the Join future, but Join is
not Unpin, so those methods must accept `Pin<&mut Self>` to be useful.
Admittedly this is a clunky API to use. I fixed cancel() but removed
detach() since implementing it would require putting the inner scope
in an Option and for the rare cases that would ever need it, mem::drop()
is a way out.
Original-Bug: 339724492
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1152733
Original-Revision: fe0477726529afe531f46ad709390d1bc7f035b7
GitOrigin-RevId: d0bb73591d0ab2a669bfd60bc9d3e57f99a1964f
Change-Id: I6825192a0a6bc199ef9bc58fa8d5090a8c6bfd111 parent 78543a0 commit e3c8fe1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments