MCPcopy Create free account
hub / github.com/apache/brpc / TaskOptions

Class TaskOptions

src/bthread/execution_queue.h:108–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106};
107
108struct TaskOptions {
109 TaskOptions();
110 TaskOptions(bool high_priority, bool in_place_if_possible);
111
112 // Executor would execute high-priority tasks in the FIFO order but before
113 // all pending normal-priority tasks.
114 // NOTE: We don't guarantee any kind of real-time as there might be tasks still
115 // in process which are uninterruptible.
116 //
117 // Default: false
118 bool high_priority;
119
120 // If |in_place_if_possible| is true, execution_queue_execute would call
121 // execute immediately instead of starting a bthread if possible
122 //
123 // Note: Running callbacks in place might cause the deadlock issue, you
124 // should be very careful turning this flag on.
125 //
126 // Default: false
127 bool in_place_if_possible;
128};
129
130const static TaskOptions TASK_OPTIONS_NORMAL = TaskOptions(false, false);
131const static TaskOptions TASK_OPTIONS_URGENT = TaskOptions(true, false);

Callers 1

execution_queue.hFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected