Function sequant::pin_default_contexts

Function Documentation

detail::ImplicitContextResetter<container::map<Statistics, Context>> sequant::pin_default_contexts()

pins the default contexts in effect for the calling thread

Note

the copies have the versions of the contexts in effect, so canonical marks made under one are valid under the other

Returns:

a move-only ContextResetter object that scopes a copy of the default contexts in effect, if the calling thread has none scoped yet, so that every read of the contexts during its lifetime sees the same ones even if another thread replaces the process-wide contexts meanwhile; a scoped context cannot change under the caller, so then nothing is installed and the object is empty