| 140 | |
| 141 | |
| 142 | static void post(struct uv__queue* q, enum uv__work_kind kind) { |
| 143 | uv_mutex_lock(&mutex); |
| 144 | if (kind == UV__WORK_SLOW_IO) { |
| 145 | /* Insert into a separate queue. */ |
| 146 | uv__queue_insert_tail(&slow_io_pending_wq, q); |
| 147 | if (!uv__queue_empty(&run_slow_work_message)) { |
| 148 | /* Running slow I/O tasks is already scheduled => Nothing to do here. |
| 149 | The worker that runs said other task will schedule this one as well. */ |
| 150 | uv_mutex_unlock(&mutex); |
| 151 | return; |
| 152 | } |
| 153 | q = &run_slow_work_message; |
| 154 | } |
| 155 | |
| 156 | uv__queue_insert_tail(&wq, q); |
| 157 | if (idle_threads > 0) |
| 158 | uv_cond_signal(&cond); |
| 159 | uv_mutex_unlock(&mutex); |
| 160 | } |
| 161 | |
| 162 | |
| 163 | #ifdef __MVS__ |
no test coverage detected