| Class | Win32::Event |
| In: |
event.rb
|
| Parent: | Ipc |
| VERSION | = | '0.5.0' |
Creates and returns new Event object. If name is omitted, the Event object is created without a name, i.e. it‘s anonymous.
If name is provided and it already exists, then it is opened instead and the manual_reset and initial_state parameters are ignored.
If the man_reset parameter is set to true, then it creates an Event object which requires use of the Event#reset method in order to set the state to non-signaled. If this parameter is false (the default) then the system automatically resets the state to non-signaled after a single waiting thread has been released.
If the init_state parameter is true, the initial state of the Event object is signaled; otherwise, it is nonsignaled (the default).
If the inherit parameter is true, then processes created by this process will inherit the handle. Otherwise they will not.
In block form this will automatically close the Event object at the end of the block.
Open an existing Event by name. The inherit argument sets whether or not the object was opened such that a process created by the CreateProcess() function (a Windows API function) can inherit the handle. The default is true.
This method is essentially identical to Event.new, except that the options for manual_reset and initial_state cannot be set (since they are already set). Also, this method will raise an Event::Error if the event doesn‘t already exist.