Class | Thread
In: | thread.rb
Parent: | Object

### Methods

exclusive

### Public Class methods

exclusive() {|| ...}

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

[Source]

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

[Validate]