Method: MonitorMixin#mon_synchronize
- Defined in:
- lib/monitor.rb
#mon_synchronize ⇒ Object Also known as: synchronize
Enters exclusive section and executes the block. Leaves the exclusive section automatically when the block exits. See example under MonitorMixin.
208 209 210 211 212 213 214 215 |
# File 'lib/monitor.rb', line 208 def mon_synchronize mon_enter begin yield ensure mon_exit end end |