зеркало из https://github.com/github/ruby.git
* lib/thread.rb (Thread.exclusive): wrap method definition in
class Thread to enable rdoc to process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5abcd32d57
Коммит
fb12e23803
|
@ -1,3 +1,8 @@
|
|||
Sun Nov 16 10:49:38 2003 Gavin Sinclair <gsinclair@soyabean.com.au>
|
||||
|
||||
* lib/thread.rb (Thread.exclusive): wrap method definition in
|
||||
class Thread to enable rdoc to process.
|
||||
|
||||
Sun Nov 16 09:45:23 2003 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* lib/net/http.rb (set_debug_output): warn if method is called
|
||||
|
|
|
@ -21,16 +21,18 @@ if $DEBUG
|
|||
Thread.abort_on_exception = true
|
||||
end
|
||||
|
||||
#
|
||||
# FIXME: not documented in Pickaxe or Nutshell.
|
||||
#
|
||||
def Thread.exclusive
|
||||
_old = Thread.critical
|
||||
begin
|
||||
Thread.critical = true
|
||||
return yield
|
||||
ensure
|
||||
Thread.critical = _old
|
||||
class Thread
|
||||
#
|
||||
# FIXME: not documented in Pickaxe or Nutshell.
|
||||
#
|
||||
def Thread.exclusive
|
||||
_old = Thread.critical
|
||||
begin
|
||||
Thread.critical = true
|
||||
return yield
|
||||
ensure
|
||||
Thread.critical = _old
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче