Skip to content
Snippets Groups Projects
Commit 10cf15aa authored by Jan David Mol's avatar Jan David Mol
Browse files

bug 1362: Cancellation::disable and friends made public because they're needed in Job.cc

parent 0b4b7a86
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,9 @@ public: ...@@ -57,7 +57,9 @@ public:
static void unregister_thread( pthread_t id ); static void unregister_thread( pthread_t id );
#endif #endif
private: // The set/disable/enable functions interfere with the reference counting
// of the routines above. Use with extreme caution.
// set (enable or disable) the cancellability of this thread. // set (enable or disable) the cancellability of this thread.
// returns the previous value. // returns the previous value.
static bool set( bool enable ); static bool set( bool enable );
...@@ -65,6 +67,7 @@ private: ...@@ -65,6 +67,7 @@ private:
static bool disable() { return set( false ); } static bool disable() { return set( false ); }
static bool enable() { return set( true ); } static bool enable() { return set( true ); }
private:
#ifdef USE_THREADS #ifdef USE_THREADS
struct thread_state { struct thread_state {
unsigned refcount; unsigned refcount;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment