Skip to content

Commit cda061a

Browse files
committedMay 8, 2015
Fixed Thread#join(timeout). Closes #3390.
The thread joining would not be signaled until the timeout expired.
1 parent 0e2ace2 commit cda061a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

Diff for: ‎vm/builtin/thread.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,9 @@ namespace rubinius {
500500
struct timespec ts = {0,0};
501501
self->join_cond_.offset(&ts, as<Float>(timeout)->val);
502502

503-
for(;;) {
504-
if(self->join_cond_.wait_until(self->join_lock_, &ts)
503+
if(self->join_cond_.wait_until(self->join_lock_, &ts)
505504
== utilities::thread::cTimedOut) {
506-
return nil<Thread>();
507-
}
505+
return nil<Thread>();
508506
}
509507
}
510508
}

0 commit comments

Comments
 (0)
Please sign in to comment.