Interface RCountDownLatchAsync

    • Method Detail

      • countDownAsync

        RFuture<Void> countDownAsync()
        Decrements the count of the latch, releasing all waiting threads if the count reaches zero.

        If the current count is greater than zero then it is decremented. If the new count is zero then all waiting threads are re-enabled for thread scheduling purposes.

        If the current count equals zero then nothing happens.

        Returns:
        void
      • getCountAsync

        RFuture<Long> getCountAsync()
        Returns the current count.

        This method is typically used for debugging and testing purposes.

        Returns:
        the current count
      • trySetCountAsync

        RFuture<Boolean> trySetCountAsync​(long count)
        Sets new count value only if previous count already has reached zero or is not set at all.
        Parameters:
        count - - number of times countDown must be invoked before threads can pass through await
        Returns:
        true if new count setted false if previous count has not reached zero