Class Thread
In: thread.rb
Parent: Object

Methods

exclusive  

Public Class methods

Wraps a block in Thread.critical, restoring the original value upon exit from the critical section.

[Source]

# File thread.rb, line 24
  def Thread.exclusive
    _old = Thread.critical
    begin
      Thread.critical = true
      return yield
    ensure
      Thread.critical = _old
    end
  end

[Validate]

ruby-doc.org is a community service provided by Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.