mirror of
https://github.com/janet-lang/janet
synced 2025-07-06 12:02:53 +00:00
Always cancel thread on windows.
This commit is contained in:
parent
8ac4eec370
commit
f3ad13c2d4
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user