tryWait method

  1. @useResult
Future<bool> tryWait(
  1. Duration timeout
)

Trying to wait for the signaled state and returns true if the event was signaled before the timeout expires, otherwise the wait attempt is canceled and false is returned.

Parameters:

  • timeout: The period of time during which an attempt to wait for the signaled state will be performed.

Implementation

@useResult
Future<bool> tryWait(Duration timeout) {
  return _queue.enqueue(timeout);
}