Warning, this enforces the excessively STRONG invariant that if any end of the deque is non-threadsafe then it may ever only be touched by one thread during its entire lifetime.
This extreme form of monagamy is easier to verify, because we don't have enough information to know if two operations on different threads are racing with one another or are properly synchronized.
The wrapper data structure has two IORefs to track the last thread that touched the left and right end of the deque, respectively.
Instances2DequeClass, PopL
DequeClass d => DequeClass (DebugDeque d)Defined in abstract-deque-0.3 · Data.Concurrent.Deque.DebuggerPopL d => PopL (DebugDeque d)Defined in abstract-deque-0.3 · Data.Concurrent.Deque.Debugger