* 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
This commit is contained in:
hsbt 2014-04-17 07:31:43 +00:00
Родитель cd7aafa855
Коммит 0476b87222
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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