From b674fc9ca2498d55c7e4f91592279eb985b8bea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Tue, 28 Jul 2020 10:58:37 +0900 Subject: Thread.exclusive: delete Has been deprecated since 2069c9e031fc968d6d3d0fe30a9316851e4d91d8. [Feature #17125][ruby-core:99636] --- prelude.rb | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'prelude.rb') diff --git a/prelude.rb b/prelude.rb index be249af751..b1e477a3ea 100644 --- a/prelude.rb +++ b/prelude.rb @@ -1,18 +1,3 @@ -class << Thread - # call-seq: - # Thread.exclusive { block } -> obj - # - # Wraps the block in a single, VM-global Mutex.synchronize, returning the - # value of the block. A thread executing inside the exclusive section will - # only block other threads which also use the Thread.exclusive mechanism. - def exclusive(&block) end if false - mutex = Mutex.new # :nodoc: - define_method(:exclusive) do |&block| - warn "Thread.exclusive is deprecated, use Thread::Mutex", uplevel: 1 - mutex.synchronize(&block) - end -end - class Binding # :nodoc: def irb -- cgit v1.2.3