|
|
@ -6,6 +6,15 @@ |
|
|
|
|
|
|
|
static std::atomic<size_t> workerCounter(0); |
|
|
|
|
|
|
|
/**
|
|
|
|
* Static method to return the shared/default queue. |
|
|
|
*/ |
|
|
|
shared_ptr<AsyncRPCQueue> AsyncRPCQueue::sharedInstance() { |
|
|
|
// Thread-safe in C+11 and gcc 4.3
|
|
|
|
static shared_ptr<AsyncRPCQueue> q = std::make_shared<AsyncRPCQueue>(); |
|
|
|
return q; |
|
|
|
} |
|
|
|
|
|
|
|
AsyncRPCQueue::AsyncRPCQueue() : closed_(false), finish_(false) { |
|
|
|
} |
|
|
|
|
|
|
|