summaryrefslogtreecommitdiff
path: root/src/mongo/executor/thread_pool_task_executor.h
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-11-09 16:42:46 -0500
committerAndy Schwerin <schwerin@mongodb.com>2015-11-09 16:42:46 -0500
commit516a702d8fe87338d8b5e10ab6f2c4939ccbd5f8 (patch)
treeb1879b8843abd7d8f857414b8e7d6bab957ee9eb /src/mongo/executor/thread_pool_task_executor.h
parentfa038b8375fd5aea4d359fe0968beb948de58782 (diff)
downloadmongo-516a702d8fe87338d8b5e10ab6f2c4939ccbd5f8.tar.gz
SERVER-20944 Replace Event on CallbackState with condition variable.
Diffstat (limited to 'src/mongo/executor/thread_pool_task_executor.h')
-rw-r--r--src/mongo/executor/thread_pool_task_executor.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mongo/executor/thread_pool_task_executor.h b/src/mongo/executor/thread_pool_task_executor.h
index 071d616aeca..926aec337b3 100644
--- a/src/mongo/executor/thread_pool_task_executor.h
+++ b/src/mongo/executor/thread_pool_task_executor.h
@@ -94,11 +94,6 @@ private:
using EventList = stdx::list<std::shared_ptr<EventState>>;
/**
- * Structure returned by makeSingletonWork, for passing into enqueueCallbackState_inlock.
- */
- struct WQEL;
-
- /**
* Returns an EventList containing one unsignaled EventState. This is a helper function for
* performing allocations outside of _mutex, and should only be called by makeSingletonWork and
* makeEvent().
@@ -110,13 +105,13 @@ private:
* executing "work" no sooner than "when" (defaults to ASAP). This function may and should be
* called outside of _mutex.
*/
- static WQEL makeSingletonWork(CallbackFn work, Date_t when = {});
+ static WorkQueue makeSingletonWorkQueue(CallbackFn work, Date_t when = {});
/**
- * Creates a new callback on "queue" to do the work described by "wqel", which was
- * itself produced via makeSingletonWork().
+ * Moves the single callback in "wq" to the end of "queue". It is required that "wq" was
+ * produced via a call to makeSingletonWorkQueue().
*/
- StatusWith<CallbackHandle> enqueueCallbackState_inlock(WorkQueue* queue, WQEL&& wqel);
+ StatusWith<CallbackHandle> enqueueCallbackState_inlock(WorkQueue* queue, WorkQueue* wq);
/**
* Signals the given event.