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 29
29:   def Thread.exclusive
30:     _old = Thread.critical
31:     begin
32:       Thread.critical = true
33:       return yield
34:     ensure
35:       Thread.critical = _old
36:     end
37:   end

Search

Google

Ruby API Docs

Links