Should types like AtomicWaker
and AbortHandle
be declared UnwindSafe
?
#2211
Labels
AtomicWaker
and AbortHandle
be declared UnwindSafe
?
#2211
I run into issues with a type I would like to be
UnwindSafe
. It contains anAbortHandle
which contains aAtomicWaker
and these types aren't unwindsafe becauseAtomicWaker
contains anUnsafeCell
.In the current state of affairs it is up to a user in such situation to go figure out from the futures source code whether these are
UnwindSafe
but it was forgotten to mark them as such, or whether they are notUnwindSafe
but that was not mentioned in the docs.From a quick look over the code for
Abortable
I can't immediately see how it could be in an invalid state because of a panic in an inopportune moment, but guaranteeing that with certainty for code one hasn't written is quite some work.So should these types be marked
UnwindSafe
and has anyone enough understanding of their internals to quickly verify that? I presume there are other types in futures that are concerned as well (eg. channel Senders/Receivers).The text was updated successfully, but these errors were encountered: