diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | prelude.rb | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,7 @@ +Thu Apr 17 16:28:10 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com> + + * prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman. + Thu Apr 17 10:03:53 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/fileutils.rb (FileUtils#copy_entry): update rdoc about 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 |