* lib/monitor.rb (ConditionVariable#wait, mon_enter, mon_exit_for_cond):

ensures Thread.critical to be false.  [ruby-talk:248300]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-04-19 05:52:49 +00:00
parent 7595c80e55
commit 378c35fc75
3 changed files with 21 additions and 11 deletions

View file

@ -1,3 +1,8 @@
Thu Apr 19 14:53:32 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/monitor.rb (ConditionVariable#wait, mon_enter, mon_exit_for_cond):
ensures Thread.critical to be false. [ruby-talk:248300]
Wed Apr 18 10:41:21 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* util.c (ruby_strtod): exponent is radix 10. [ruby-talk:248272]

View file

@ -105,6 +105,7 @@ module MonitorMixin
return false
ensure
Thread.critical = true
begin
if timer && timer.alive?
Thread.kill(timer)
end
@ -112,9 +113,11 @@ module MonitorMixin
@waiters.delete(Thread.current)
end
@monitor.instance_eval {mon_enter_for_cond(count)}
ensure
Thread.critical = false
end
end
end
# call #wait while the supplied block returns +true+.
@ -210,6 +213,7 @@ module MonitorMixin
Thread.critical = true
mon_acquire(@mon_entering_queue)
@mon_count += 1
ensure
Thread.critical = false
end
@ -299,8 +303,9 @@ module MonitorMixin
def mon_exit_for_cond
count = @mon_count
@mon_count = 0
mon_release
return count
ensure
mon_release
end
end

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.6"
#define RUBY_RELEASE_DATE "2007-04-18"
#define RUBY_RELEASE_DATE "2007-04-19"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070418
#define RUBY_RELEASE_CODE 20070419
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 4
#define RUBY_RELEASE_DAY 18
#define RUBY_RELEASE_DAY 19
RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];