Skip to content

Commit 95d93ec

Browse files
committed
squash! fix watchdog performance
1 parent 1fe0ec4 commit 95d93ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/mini_racer_extension/mini_racer_extension.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ static void *v8_watchdog(void *arg)
573573
deadline = deadline_ms(c->timeout);
574574
pthread_mutex_lock(&c->wd.mtx);
575575
for (;;) {
576+
if (c->wd.cancel)
577+
break;
576578
pthread_cond_timedwait(&c->wd.cv, &c->wd.mtx, &deadline);
577579
if (c->wd.cancel)
578580
break;

0 commit comments

Comments
 (0)