Wraps a block in Thread.critical, restoring the original value upon exit from the critical section.
Source Code
# File thread.rb, line 24 def Thread.exclusive _old = Thread.critical begin Thread.critical = true return yield ensure Thread.critical = _old end end
<code/>and<pre/>for code samples.