Lumiera  0.pre.03
»edit your freedom«
nobug-resource-handle-context.hpp File Reference

Go to the source code of this file.

Description

Thread-local stack of NoBug resource handles.

This helper allows to access the resource handle in the nearest enclosing scope. The motivation for this approach was to avoid passing the resource handle over several intermediary function calls when using a scoped variable to control object monitor locking. Within this usage context, the necessity of passing a NoBug resource handle seems to be a cross-cutting concern, and not directly related to the core concern (controlling a mutex).

Remarks
as of 8/2011, this feature is not used anymore. In 12/2011, the concept of a diagnostic context stack was generalised. At that point, this header was created as an off-spin, now based on the generalised feature, to document this usage possibility, which might be required again at some point in the future.
See also
lib::DiagnosticContext
diagnostic-context-test.hpp

Definition in file nobug-resource-handle-context.hpp.

#include "lib/error.hpp"
#include "lib/diagnostic-context.hpp"
#include "lib/thread-local.hpp"
#include <nobug.h>

Classes

class  NobugResourceHandleContext
 Disabled placeholder for the Diagnostic context, not used in release builds. More...
 

Namespaces

 lib
 Implementation namespace for support and library code.