Click or drag to resize

ICountDownLatchTrySetCount Method

Sets the count to the given value if the current count is zero.

Namespace:  Hazelcast.Core
Assembly:  Hazelcast.Net (in Hazelcast.Net.dll) Version: 3.9.3
Syntax
bool TrySetCount(
	int count
)

Parameters

count
Type: SystemInt32
the number of times CountDown() must be invoked before threads can pass through Await(long, TimeUnit)

Return Value

Type: Boolean
true
if the new count was set or
false
if the current count is not zero
Exceptions
ExceptionCondition
ArgumentException if
count
is negative
Remarks
Sets the count to the given value if the current count is zero.

If count is not zero then this method does nothing and returns

false
.
See Also