Class Awaitable.AsyncAwaitable

    • Constructor Detail

      • AsyncAwaitable

        protected AsyncAwaitable()
    • Method Detail

      • await

        public Awaitable await()
                        throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException - if interrupted
      • awaitUntil

        public boolean awaitUntil​(long nanoTimeDeadline)
                           throws java.lang.InterruptedException
        Returns:
        true if we were signalled, false if the deadline elapsed
        Throws:
        java.lang.InterruptedException - if interrupted
      • signal

        protected void signal()
        Signal any waiting threads; isSignalled() must return true before this method is invoked.
      • isSignalled

        protected abstract boolean isSignalled()
        Return true once signalled. Unidirectional; once true, must never again be false.