mirror of
https://github.com/janet-lang/janet
synced 2025-09-10 06:46:08 +00:00
Always cancel thread on windows.
This commit is contained in:
@@ -620,7 +620,7 @@ static void janet_timeout_stop(int sig_num) {
|
|||||||
static void handle_timeout_worker(JanetTimeout to, int cancel) {
|
static void handle_timeout_worker(JanetTimeout to, int cancel) {
|
||||||
if (!to.has_worker) return;
|
if (!to.has_worker) return;
|
||||||
#ifdef JANET_WINDOWS
|
#ifdef JANET_WINDOWS
|
||||||
if (cancel) QueueUserAPC(janet_timeout_stop, to.worker, 0);
|
QueueUserAPC(janet_timeout_stop, to.worker, 0);
|
||||||
WaitForSingleObject(to.worker, INFINITE);
|
WaitForSingleObject(to.worker, INFINITE);
|
||||||
CloseHandle(to.worker);
|
CloseHandle(to.worker);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user