Hi,
In message "Re: sleep is broken with --enable-pthread [Was: Bad interaction between timeout.rb and --enable-pthread]"
on 04/01/02, Yukihiro Matsumoto <matz / ruby-lang.org> writes:
|Nathaniel, can you try this?
I left small typo in the patch. Try this one instead.
--- configure.in 27 Dec 2003 14:42:41 -0000 1.215
+++ configure.in 1 Jan 2004 16:24:24 -0000
@@ -709,3 +709,3 @@ if test x"$enable_pthread" = xyes; then
fi
- AC_CHECK_FUNC(nanosleep)
+ AC_CHECK_FUNCS(nanosleep)
if test x"$ac_cv_func_nanosleep" = xno; then
--- eval.c 30 Dec 2003 16:36:05 -0000 1.622
+++ eval.c 1 Jan 2004 16:24:58 -0000
@@ -10315,2 +10315,3 @@ rb_thread_wait_for(time)
int n;
+ int thr_critical = rb_thread_critical;
#ifndef linux
@@ -10320,4 +10321,6 @@ rb_thread_wait_for(time)
for (;;) {
+ rb_thread_critical = Qtrue;
TRAP_BEG;
n = select(0, 0, 0, 0, &time);
+ rb_thread_critical = thr_critical;
TRAP_END;