From 060b6318963aba7516c7f3385d0385cc95bd4241 Mon Sep 17 00:00:00 2001 From: shugo Date: Mon, 12 Mar 2007 22:24:32 +0000 Subject: [PATCH] * lib/monitor.rb (mon_try_enter): call @mon_muetx.try_lock. Thanks, Keiju ISHITSUKA. [ruby-dev:30507] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/monitor.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2dacac237f..02f83387b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 13 07:23:20 2007 Shugo Maeda + + * lib/monitor.rb (mon_try_enter): call @mon_muetx.try_lock. + Thanks, Keiju ISHITSUKA. [ruby-dev:30507] + Tue Mar 13 02:42:58 2007 Akinori MUSHA * lib/cgi.rb (CGI::header): IIS >= 5.0 does not need the nph diff --git a/lib/monitor.rb b/lib/monitor.rb index b556747577..4d31dca41a 100644 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -145,7 +145,7 @@ module MonitorMixin # def mon_try_enter if @mon_owner != Thread.current - unless @mon_owner.trylock + unless @mon_mutex.try_lock return false end @mon_owner = Thread.current