From a9cb5734bb8d3697e454bce3426763c7afeee80f Mon Sep 17 00:00:00 2001 From: knu Date: Sat, 10 Feb 2007 21:41:26 +0000 Subject: * configure.in, ext/thread/extconf.rb, lib/thread.rb: Add a configure option `--disable-fastthread', to choose the original, pure ruby version of the "thread" library instead of the new, much faster implementation in ext/thread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@11698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ configure.in | 5 +++++ ext/thread/extconf.rb | 2 ++ lib/thread.rb | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2681e056a..acd4bb8be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Feb 11 06:27:54 2007 Akinori MUSHA + + * configure.in, ext/thread/extconf.rb, lib/thread.rb: Add a + configure option `--disable-fastthread', to choose the original, + pure ruby version of the "thread" library instead of the new, + much faster implementation in ext/thread. + Sun Feb 11 06:22:20 2007 Akinori MUSHA * ext/Setup: Add thread except for platforms without threads diff --git a/configure.in b/configure.in index ea087c26f..4c59fa488 100644 --- a/configure.in +++ b/configure.in @@ -350,6 +350,11 @@ AC_ARG_ENABLE(pthread, [ --enable-pthread use pthread library.], [enable_pthread=$enableval], [enable_pthread=no]) +AC_ARG_ENABLE(fastthread, + [ --disable-fastthread do not use the fastthread mutex], [ + : handled by ext/thread/extconf.rb + ]) + dnl Checks for libraries. case "$target_os" in nextstep*) ;; diff --git a/ext/thread/extconf.rb b/ext/thread/extconf.rb index efe1d5dbe..2f984efc6 100644 --- a/ext/thread/extconf.rb +++ b/ext/thread/extconf.rb @@ -1,5 +1,7 @@ require 'mkmf' +enable_config('fastthread', true) or exit + if with_config('mem-pools', true) $CPPFLAGS << ' -DUSE_MEM_POOLS' end diff --git a/lib/thread.rb b/lib/thread.rb index c4bb141ce..7df6a140f 100644 --- a/lib/thread.rb +++ b/lib/thread.rb @@ -1,4 +1,8 @@ # +# NOTE: +# This file is overwritten by ext/thread/lib/thread.rb unless ruby +# is configured with --disable-fastthread. +# # thread.rb - thread support classes # $Date$ # by Yukihiro Matsumoto -- cgit