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

fix mutex deadlock test hang-up.

* thread_win32.c (abs_timespec_to_timeout_ms): fix 1000x calculation
  mistake. (ie fix hang-up native_cond_timedwait())



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kosaki 2011-05-07 03:43:27 +00:00
parent 7ac6b706b4
commit 471fb33b1a
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Sat May 7 12:41:04 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
fix mutex deadlock test hang-up.
* thread_win32.c (abs_timespec_to_timeout_ms): fix 1000x calculation
mistake. (ie fix hang-up native_cond_timedwait())
Sat May 7 03:14:13 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
sleep_cond use monotonic time if possible.

View file

@ -471,7 +471,7 @@ abs_timespec_to_timeout_ms(struct timespec *ts)
gettimeofday(&now, NULL);
tv.tv_sec = ts->tv_sec;
tv.tv_usec = ts->tv_nsec;
tv.tv_usec = ts->tv_nsec / 1000;
if (!rb_w32_time_subtract(&tv, &now))
return 0;