summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/threadpool.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibuv/src/threadpool.c')
-rw-r--r--Utilities/cmlibuv/src/threadpool.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Utilities/cmlibuv/src/threadpool.c b/Utilities/cmlibuv/src/threadpool.c
index 0998938..e804c7c 100644
--- a/Utilities/cmlibuv/src/threadpool.c
+++ b/Utilities/cmlibuv/src/threadpool.c
@@ -160,14 +160,20 @@ static void post(QUEUE* q, enum uv__work_kind kind) {
}
+#ifdef __MVS__
+/* TODO(itodorov) - zos: revisit when Woz compiler is available. */
+__attribute__((destructor))
+#endif
void uv__threadpool_cleanup(void) {
-#ifndef _WIN32
unsigned int i;
if (nthreads == 0)
return;
+#ifndef __MVS__
+ /* TODO(gabylb) - zos: revisit when Woz compiler is available. */
post(&exit_message, UV__WORK_CPU);
+#endif
for (i = 0; i < nthreads; i++)
if (uv_thread_join(threads + i))
@@ -181,7 +187,6 @@ void uv__threadpool_cleanup(void) {
threads = NULL;
nthreads = 0;
-#endif
}