Pop a task from the front of the queue
| 61 | |
| 62 | // Pop a task from the front of the queue |
| 63 | task_run_handle pop() |
| 64 | { |
| 65 | // See if an item is available |
| 66 | if (head == tail) |
| 67 | return task_run_handle(); |
| 68 | else { |
| 69 | void* x = items[head]; |
| 70 | head = (head + 1) & (items.size() - 1); |
| 71 | return task_run_handle::from_void_ptr(x); |
| 72 | } |
| 73 | } |
| 74 | }; |
| 75 | |
| 76 | } // namespace detail |
no test coverage detected