summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-13 04:05:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-13 04:05:43 +0000
commit2069c9e031fc968d6d3d0fe30a9316851e4d91d8 (patch)
tree54688e07b9ad70668d719479e97dd266d8dc7ab9
parentaa4ab1814d868e1002e009174944e4f85d2b7448 (diff)
prelude.rb: deprecate Thread.exclusive
* prelude.rb (Thread.exclusive): warn as deprecated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--prelude.rb1
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 72dc33f..ac9c411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Nov 13 13:05:37 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * prelude.rb (Thread.exclusive): warn as deprecated.
+
Fri Nov 13 10:36:39 2015 Victor Nawothnig <Victor.Nawothnig@gmail.com>
* parse.y (new_unless): optimize constant condition for `unless`
diff --git a/prelude.rb b/prelude.rb
index 20a9e2d..8a172a2 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -8,6 +8,7 @@ class Thread
# 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
}