diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-10 21:41:26 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-10 21:41:26 +0000 |
commit | 02db1bdf776c06839de78e557f8259f2c3803e5b (patch) | |
tree | 850a447972a24dbc0fb468f5466342a26a93d486 | |
parent | 78128f5e85d8a3ee9000375086168bc9110564ba (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | ext/thread/extconf.rb | 2 | ||||
-rw-r--r-- | lib/thread.rb | 4 |
4 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Sun Feb 11 06:27:54 2007 Akinori MUSHA <knu@iDaemons.org> + + * 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 <knu@iDaemons.org> * ext/Setup: Add thread except for platforms without threads diff --git a/configure.in b/configure.in index ea087c26f7..4c59fa488e 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 efe1d5dbe5..2f984efc6d 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 c4bb141ce7..7df6a140f5 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 <matz@netlab.co.jp> |