Skip to content

Commit

Permalink
Fixed Thread#join(timeout). Closes #3390.
Browse files Browse the repository at this point in the history
The thread joining would not be signaled until the timeout expired.
  • Loading branch information
brixen committed May 8, 2015
1 parent 0e2ace2 commit cda061a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vm/builtin/thread.cpp
Expand Up @@ -500,11 +500,9 @@ namespace rubinius {
struct timespec ts = {0,0};
self->join_cond_.offset(&ts, as<Float>(timeout)->val);

for(;;) {
if(self->join_cond_.wait_until(self->join_lock_, &ts)
if(self->join_cond_.wait_until(self->join_lock_, &ts)
== utilities::thread::cTimedOut) {
return nil<Thread>();
}
return nil<Thread>();
}
}
}
Expand Down

0 comments on commit cda061a

Please sign in to comment.