summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 19:03:44 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 19:03:44 +0000
commitbfdf6cde9f0df27814a8cd6a2fc74a7ea584c910 (patch)
tree0e87b870a5e078541aab0fd9b42572798890af68 /thread.c
parent49a5f2c57cd7b3fc97730ba7562a3aa2efa448a9 (diff)
Revert "thread.c (sleep_*): check interrupt before changing th->status"
This reverts commit 9e59487a38d914275bedcde723923f22b3779e59 (r64449) More (but different) CI failures I can't reproduce locally... http://ci.rvm.jp/results/trunk-test@ruby-sky3/1235951 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 075ce31..8254c7d 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);