NamedSemaphoreOpenExisting Method

Opens an existing named semaphore.

Definition

Namespace: Gemstone.Threading
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static NamedSemaphore OpenExisting(
	string name
)

Parameters

name  String
The unique name identifying the semaphore. This name is case-sensitive. Use a backslash (\\) to specify a namespace, but avoid it elsewhere in the name. On Unix-based systems, the name should conform to valid file naming conventions, excluding slashes except for an optional namespace backslash. The name length is limited to 250 characters after any optional namespace.

Return Value

NamedSemaphore
An object that represents the opened named semaphore.

Remarks

The name may be prefixed with Global\ or Local\ to specify a namespace. When the Global namespace is specified, the synchronization object may 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 may 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 may be appropriate for synchronizing between processes with a parent/child relationship where they all run in the same session.

See Also