Edit

Share via


NamedWaitHandleOptions Struct

Definition

Represents a set of options for named synchronization objects that are wait handles and can be shared between processes, such as Mutex, Semaphore, and EventWaitHandle.

public value class NamedWaitHandleOptions
public struct NamedWaitHandleOptions
type NamedWaitHandleOptions = struct
Public Structure NamedWaitHandleOptions
Inheritance
NamedWaitHandleOptions

Remarks

This structure is used with constructors and methods that create or open named synchronization objects that are wait handles and can be shared between processes, such as Mutex, Semaphore, and EventWaitHandle.

As an alternative to the methods that accept a NamedWaitHandleOptions parameter to set the scope, methods that only take a name parameter can prefix the parameter with Global\ or Local\ to specify a namespace. When the Global namespace is specified, the synchronization object can be shared with any processes on the system. When the Local namespace is specified, which is also the default when no namespace is specified, the synchronization object can be shared with processes in the same session. On Windows, a session is a login session, and services typically run in a different non-interactive session. On Unix-like operating systems, each shell has its own session. Session-local synchronization objects might be appropriate for synchronizing between processes with a parent/child relationship where they all run in the same session. For more information about synchronization object names on Windows, see Object Names.

Properties

CurrentSessionOnly

Gets or sets a value that indicates whether the named synchronization object is limited in access to the current session.

CurrentUserOnly

Gets or sets a value that indicates whether the named synchronization object is limited in access to the current user.

Applies to