summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 075ce31170..8254c7dc0c 100644
--- a/thread.c
+++ b/thread.c
@@ -1186,8 +1186,8 @@ sleep_forever(rb_thread_t *th, unsigned int fl)
int woke;
status = fl & SLEEP_DEADLOCKABLE ? THREAD_STOPPED_FOREVER : THREAD_STOPPED;
- RUBY_VM_CHECK_INTS_BLOCKING(th->ec);
th->status = status;
+ RUBY_VM_CHECK_INTS_BLOCKING(th->ec);
while (th->status == status) {
if (fl & SLEEP_DEADLOCKABLE) {
th->vm->sleeper++;
@@ -1292,8 +1292,8 @@ sleep_timespec(rb_thread_t *th, struct timespec ts, unsigned int fl)
getclockofday(&end);
timespec_add(&end, &ts);
- RUBY_VM_CHECK_INTS_BLOCKING(th->ec);
th->status = THREAD_STOPPED;
+ RUBY_VM_CHECK_INTS_BLOCKING(th->ec);
while (th->status == THREAD_STOPPED) {
native_sleep(th, &ts);
woke = vm_check_ints_blocking(th->ec);