![](../icons/Hazelcast-IMDG-Logo-Orange_Dark_200px.jpg) | 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.4
Syntaxbool TrySetCount(
int count
)
Function TrySetCount (
count As Integer
) As Boolean
bool TrySetCount(
int count
)
abstract TrySetCount :
count : int -> bool
Parameters
- count
- Type: SystemInt32
the number of times
CountDown()
must be invoked
before threads can pass through
Await(long, TimeUnit)
Return Value
Type:
Boolean
if the new count was set or
if the current
count is not zero
Exceptions
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
.
See Also