Class Monitor
In: monitor.rb
Parent: Object

Monitors provide means of mutual exclusion for Thread programming. A critical region is created by means of the synchronize method, which takes a block. The condition variables (created with new_cond) may be used to control the execution of a monitor with signal and wait.

the Monitor class wraps MonitorMixin, and provides aliases

 alias try_enter try_mon_enter
 alias enter mon_enter
 alias exit mon_exit

to access its methods more concisely.

Included Modules

MonitorMixin

External Aliases

try_mon_enter -> try_enter
mon_enter -> enter
mon_exit -> exit

[Validate]

ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.

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.