[前][次][番号順一覧][スレッド一覧]

ruby-changes:40473

From: nobu <ko1@a...>
Date: Fri, 13 Nov 2015 13:06:01 +0900 (JST)
Subject: [ruby-changes:40473] nobu:r52554 (trunk): prelude.rb: deprecate Thread.exclusive

nobu	2015-11-13 13:05:43 +0900 (Fri, 13 Nov 2015)

  New Revision: 52554

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52554

  Log:
    prelude.rb: deprecate Thread.exclusive
    
    * prelude.rb (Thread.exclusive): warn as deprecated.

  Modified files:
    trunk/ChangeLog
    trunk/prelude.rb
Index: prelude.rb
===================================================================
--- prelude.rb	(revision 52553)
+++ prelude.rb	(revision 52554)
@@ -8,6 +8,7 @@ class Thread https://github.com/ruby/ruby/blob/trunk/prelude.rb#L8
   # value of the block. A thread executing inside the exclusive section will
   # only block other threads which also use the Thread.exclusive mechanism.
   def self.exclusive
+    warn "Thread.exclusive is deprecated, use Mutex", caller
     MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{
       yield
     }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52553)
+++ ChangeLog	(revision 52554)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov 13 13:05:37 2015  Nobuyoshi Nakada  <nobu@r...>
+
+	* prelude.rb (Thread.exclusive): warn as deprecated.
+
 Fri Nov 13 10:36:39 2015  Victor Nawothnig  <Victor.Nawothnig@g...>
 
 	* parse.y (new_unless): optimize constant condition for `unless`

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]