Static regex_automata::util::pool::inner::THREAD_ID_DROPPED
source · static THREAD_ID_DROPPED: usize
Expand description
This sentinel is used to indicate that a guard has already been dropped and should not be re-dropped. We use this because our drop code can be called outside of Drop and thus there could be a bug in the internal implementation that results in trying to put the same guard back into the same pool multiple times, and that could result in UB if we didn’t mark the guard as already having been put back in the pool.
So this isn’t strictly necessary, but this let’s us define some routines as safe (like PoolGuard::put_imp) that we couldn’t otherwise do.