mitsuhiko/fragile

Why does Fragile only panic on drop if `std::mem::needs_drop::<T>()` is true?

Closed this issue · 2 comments

anp commented

An alternative might be to always ensure that the drop is occurring on the right thread, as a way to provide a guard rail against incorrect use of the API.

This question came up while reviewing the crate for vendoring, relaying here.

@anp do you see a situation where it would be beneficial for a drop to be forced to the right thread? The main reason I decided on this is that you can have a non send type that doesn't have a dtor at all in which case that is an unnecessary restriction that doesn't help much.

Closing this due to lack of activity.