NamedSemaphore(Int32, Int32, String) Constructor
Initializes a new instance of the
NamedSemaphore class, specifying the initial number of entries,
the maximum number of concurrent entries, and the name of a system semaphore object.
Namespace: Gemstone.ThreadingAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public NamedSemaphore(
int initialCount,
int maximumCount,
string name
)
Public Sub New (
initialCount As Integer,
maximumCount As Integer,
name As String
)
public:
NamedSemaphore(
int initialCount,
int maximumCount,
String^ name
)
Gemstone.Threading.NamedSemaphore = function(initialCount, maximumCount, name);
Parameters
- initialCount Int32
- The initial number of requests for the semaphore that can be granted concurrently.
- maximumCount Int32
- The maximum number of requests for the semaphore that can be granted concurrently.
- 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.
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.