summaryrefslogtreecommitdiff
path: root/prelude.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-17 07:31:43 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-17 07:31:43 +0000
commit0476b8722290a9a5ff29c4b96447a4c4778a9c62 (patch)
tree6c09d48c9f45cf13885bf800827bc9d1a4301c64 /prelude.rb
parentcd7aafa855e256c75cb6f46ccd20befdee582611 (diff)
downloadruby-0476b8722290a9a5ff29c4b96447a4c4778a9c62.tar.gz
* prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman.
[ci skip][fix GH-589] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'prelude.rb')
-rw-r--r--prelude.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/prelude.rb b/prelude.rb
index 2b371e7134..cc24a81474 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -4,9 +4,9 @@ class Thread
# call-seq:
# Thread.exclusive { block } => obj
#
- # Wraps a block in Thread.critical, restoring the original value
- # upon exit from the critical section, and returns the value of the
- # block.
+ # 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 self.exclusive
MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{
yield