Check whether the thread itself already locks the mutex; only a
hack currently, won’t be generally reliable, right? Should
probably use cooptex or tracing-mutex instead.
To use conditionally in debug mode, import as:
Macro that defines code to delegate trait methods to the
same-named and -typed original methods. This requires the map type
name to be given twice, and to use K and V as type names, or the
macro wouldn’t work (macros by example do not appear to have the
features necessay to do this properly).
Make a delimited for temporary objects. Unlike { ... } which is
not enough, this macro also includes a ; which does the
trick. Useful e.g. to limit the scope of Mutex or RefCell guards.