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

Function uv__threadpool_cleanup

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

TODO(itodorov) - zos: revisit when Woz compiler is available. */

Source from the content-addressed store, hash-verified

163#ifdef __MVS__
164/* TODO(itodorov) - zos: revisit when Woz compiler is available. */
165__attribute__((destructor))
166#endif
167void uv__threadpool_cleanup(void) {
168 unsigned int i;
169
170 if (nthreads == 0)
171 return;
172
173#ifndef __MVS__
174 /* TODO(gabylb) - zos: revisit when Woz compiler is available. */
175 post(&exit_message, UV__WORK_CPU);
176#endif
177
178 for (i = 0; i < nthreads; i++)
179 if (uv_thread_join(threads + i))
180 abort();
181
182 if (threads != default_threads)
183 uv__free(threads);
184
185 uv_mutex_destroy(&mutex);
186 uv_cond_destroy(&cond);
187
188 threads = NULL;
189 nthreads = 0;
190}
191
192
193static void init_threads(void) {

Callers 1

uv_library_shutdownFunction · 0.85

Calls 5

postFunction · 0.85
uv__freeFunction · 0.85
uv_thread_joinFunction · 0.50
uv_mutex_destroyFunction · 0.50
uv_cond_destroyFunction · 0.50

Tested by

no test coverage detected