Skip to content

Commit

Permalink
prelude.rb: deprecate Thread.exclusive
Browse files Browse the repository at this point in the history
* prelude.rb (Thread.exclusive): warn as deprecated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Nov 13, 2015
1 parent aa4ab18 commit 2069c9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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`
Expand Down
1 change: 1 addition & 0 deletions prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 2069c9e

Please sign in to comment.