Edit

Share via


NamedWaitHandleOptions.CurrentSessionOnly Property

Definition

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

public:
 property bool CurrentSessionOnly { bool get(); void set(bool value); };
public bool CurrentSessionOnly { get; set; }
member this.CurrentSessionOnly : bool with get, set
Public Property CurrentSessionOnly As Boolean

Property Value

true if the named synchronization object is limited in access to the current session; otherwise, false. The default is true.

Remarks

Each session has namespaces for the object's name that are used when the option is true. These session-scoped namespaces are distinct from session-scoped namespaces for other sessions, and also distinct from namespaces used when the option is false.

If the option is true when creating a named synchronization object, the object is limited in scope to the current session, and can't be opened by processes running in different sessions.

If the option is false when creating a named synchronization object, the object is not limited in access to a session.

On Windows, a session is a Terminal Services session. On Unix-like operating systems, a session is typically a shell session, where each shell gets its own session in which processes started from the shell run.

Applies to