mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 10:33:58 +02:00
* 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:
parent
7595c80e55
commit
378c35fc75
3 changed files with 21 additions and 11 deletions
|
@ -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]
|
||||
|
|
|
@ -105,14 +105,17 @@ module MonitorMixin
|
|||
return false
|
||||
ensure
|
||||
Thread.critical = true
|
||||
if timer && timer.alive?
|
||||
Thread.kill(timer)
|
||||
begin
|
||||
if timer && timer.alive?
|
||||
Thread.kill(timer)
|
||||
end
|
||||
if @waiters.include?(Thread.current) # interrupted?
|
||||
@waiters.delete(Thread.current)
|
||||
end
|
||||
@monitor.instance_eval {mon_enter_for_cond(count)}
|
||||
ensure
|
||||
Thread.critical = false
|
||||
end
|
||||
if @waiters.include?(Thread.current) # interrupted?
|
||||
@waiters.delete(Thread.current)
|
||||
end
|
||||
@monitor.instance_eval {mon_enter_for_cond(count)}
|
||||
Thread.critical = false
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue