WaitGroup class
A WaitGroup waits for a collection of processes to finish. The main process calls add to set the number of processes to wait for. Then each of the processes runs and calls done when finished. At the same time, wait can be used to block until all processes have finished.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
[int amount = 1]) → void - Adds delta, which may be negative, to the WaitGroup counter. If a wait Future is open and the counter becomes zero, the future is released. If the counter goes negative, it throws.
-
done(
) → void - Decrements the WaitGroup counter.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wait(
) → Future - Returns a future that will complete when the WaitGroup counter is zero.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited