io: Refactor out usage of Weak
in the io handle
#4509
Labels
A-tokio
Area: The main tokio crate
C-maintenance
Category: PRs that clean code up or issues documenting cleanup.
M-io
Module: tokio/io
Remove the use of
Weak
in the I/O Driver handle similar to how the timer does it. This will allow theIoHandle
to storeArc<Inner>
rather than requireWeak::upgrade
to access the inner timer.The reason for
Weak
was to avoid cycles caused by wakers stored in the driver pointing to the runtime which points back to the driver. The cycle can be broken by making sure nobody can register a new io resources on (shutdown?) and by emptying the driver.The text was updated successfully, but these errors were encountered: