xtd::threading::event_wait_handle::event_wait_handle | ( | bool | initial_state, |
event_reset_mode | mode, | ||
const string & | name, | ||
bool & | created_new | ||
) |
Initializes a new instance of the xtd::threading::event_wait_handle class, specifying whether the wait handle is initially signaled if created as a result of this call, whether it resets automatically or manually, the name of a system synchronization event, and a bool variable whose value after the call indicates whether the named system event was created.
initial_state | true to set the initial state to signaled; false to set it to nonsignaled. |
mode | One of the xtd::threading::event_reset_mode values that determines whether the event resets automatically or manually. |
name | The name, if the synchronization object is to be shared with other processes; otherwise, null or an empty string. The name is case-sensitive. The backslash character () is reserved and may only be used to specify a namespace. For more information on namespaces, see the remarks section. There may be further restrictions on the name depending on the operating system. For example, on Unix-based operating systems, the name after excluding the namespace must be a valid file name. |
created_new | When this method returns, contains true if a local event was created (that is, if name is null or an empty string) or if the specified named system event was created; false if the specified named system event already existed. This parameter is passed uninitialized. |
xtd::io::io_exception | name is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix or invalid characters. Note that the name and common prefixes "Global\" and "Local" are case-sensitive. -or- There was some other error. The HResult property may provide more information. |
xtd::io::path_too_long_exception | The name is too long. Length restrictions may depend on the operating system or configuration. |
xtd::threading::wait_handle_cannot_be_opened_exception | A synchronization object with the provided name cannot be created. A synchronization object of a different type might have the same name. |
xtd::argument_exception | The mode enum value was out of legal range. |