diff options
Diffstat (limited to 'src/checkqueue.h')
-rw-r--r-- | src/checkqueue.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/checkqueue.h b/src/checkqueue.h index b8e2a17c76..7f6eae6509 100644 --- a/src/checkqueue.h +++ b/src/checkqueue.h @@ -161,7 +161,12 @@ public: { } - friend class CCheckQueueControl<T>; + bool IsIdle() + { + boost::unique_lock<boost::mutex> lock(mutex); + return (nTotal == nIdle && nTodo == 0 && fAllOk == true); + } + }; /** @@ -180,9 +185,8 @@ public: { // passed queue is supposed to be unused, or NULL if (pqueue != NULL) { - assert(pqueue->nTotal == pqueue->nIdle); - assert(pqueue->nTodo == 0); - assert(pqueue->fAllOk == true); + bool isIdle = pqueue->IsIdle(); + assert(isIdle); } } |