diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2017-09-07 14:31:26 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2017-09-20 11:27:32 -0400 |
commit | 12648f2b54c9662c9809ef24b779118cb90771bb (patch) | |
tree | 30b05ada6473eff1d2b8dd31432e20900e56c9d8 /src/mongo/transport/service_executor.h | |
parent | c565d15a53cd6dd452da97d49c6b9c6cbffb6cf1 (diff) | |
download | mongo-12648f2b54c9662c9809ef24b779118cb90771bb.tar.gz |
SERVER-30613 Make adaptive executor separate task types when avoiding starvation
Diffstat (limited to 'src/mongo/transport/service_executor.h')
-rw-r--r-- | src/mongo/transport/service_executor.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mongo/transport/service_executor.h b/src/mongo/transport/service_executor.h index b4570d3e2b6..436c331882c 100644 --- a/src/mongo/transport/service_executor.h +++ b/src/mongo/transport/service_executor.h @@ -46,8 +46,15 @@ public: virtual ~ServiceExecutor() = default; using Task = stdx::function<void()>; enum ScheduleFlags { - EmptyFlags = 0, - DeferredTask = 1, + // No flags (kEmptyFlags) specifies that this is a normal task and that the executor should + // launch new threads as needed to run the task. + kEmptyFlags = 1 << 0, + + // Deferred tasks will never get a new thread launched to run them. + kDeferredTask = 1 << 1, + + // MayRecurse indicates that a task may be run recursively. + kMayRecurse = 1 << 2, }; /* |