| 215 | } |
| 216 | |
| 217 | inline |
| 218 | void IoQueue::doEnqueue(ITask::Ptr task) |
| 219 | { |
| 220 | bool isEmpty = _queue.empty(); |
| 221 | if (task->isHighPriority()) |
| 222 | { |
| 223 | _stats.incHighPriorityCount(); |
| 224 | _queue.emplace_front(std::static_pointer_cast<IoTask>(task)); |
| 225 | } |
| 226 | else |
| 227 | { |
| 228 | _queue.emplace_back(std::static_pointer_cast<IoTask>(task)); |
| 229 | } |
| 230 | _stats.incPostedCount(); |
| 231 | _stats.incNumElements(); |
| 232 | if (!_loadBalanceSharedIoQueues && isEmpty) |
| 233 | { |
| 234 | //signal on transition from 0 to 1 element only |
| 235 | signalEmptyCondition(false); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | inline |
| 240 | ITask::Ptr IoQueue::dequeue(std::atomic_bool& hint) |
nothing calls this directly
no test coverage detected