cleanup,win: Remove _WIN32 guards on threadpool
Fixes: https://github.com/libuv/libuv/issues/2980 Refs: https://github.com/nodejs/node/pull/35021 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
parent
07b86b96c8
commit
a98839d7bf
@ -161,7 +161,6 @@ static void post(QUEUE* q, enum uv__work_kind kind) {
|
||||
|
||||
|
||||
void uv__threadpool_cleanup(void) {
|
||||
#ifndef _WIN32
|
||||
unsigned int i;
|
||||
|
||||
if (nthreads == 0)
|
||||
@ -181,7 +180,6 @@ void uv__threadpool_cleanup(void) {
|
||||
|
||||
threads = NULL;
|
||||
nthreads = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -872,7 +872,11 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef __GNUC__ /* Also covers __clang__ and __INTEL_COMPILER. */
|
||||
/* Also covers __clang__ and __INTEL_COMPILER. Disabled on Windows because
|
||||
* threads have already been forcibly terminated by the operating system
|
||||
* by the time destructors run, ergo, it's not safe to try to clean them up.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(_WIN32)
|
||||
__attribute__((destructor))
|
||||
#endif
|
||||
void uv_library_shutdown(void) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user