MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / post

Function post

third-party/libuv-1.46.0/src/threadpool.c:142–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141
142static 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__

Callers 2

uv__threadpool_cleanupFunction · 0.85
uv__work_submitFunction · 0.85

Calls 5

uv__queue_insert_tailFunction · 0.85
uv__queue_emptyFunction · 0.85
uv_mutex_lockFunction · 0.50
uv_mutex_unlockFunction · 0.50
uv_cond_signalFunction · 0.50

Tested by

no test coverage detected