1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT

when timed out.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-11-06 22:43:30 +00:00
parent 1343680398
commit 2657faae01
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Nov 7 07:43:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (thread_timer): pthread_cond_timedwait returns ETIMEDOUT
when timed out.
Fri Nov 7 07:32:55 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/yaml/rubytypes.rb: support Rational and Complex as 1.8

View file

@ -672,7 +672,7 @@ thread_timer(void *dummy)
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&lock);
#define WAIT_FOR_10MS() (pthread_cond_timedwait(&timer_thread_cond, &lock, get_ts(&ts, PER_NANO/100)) == 0)
#define WAIT_FOR_10MS() (pthread_cond_timedwait(&timer_thread_cond, &lock, get_ts(&ts, PER_NANO/100)) == ETIMEDOUT)
while (WAIT_FOR_10MS()) {
#ifndef __CYGWIN__
if (signal_thread_list_anchor.next) {