Syn::Core::WaitGroup
Inherits Struct / Value / Object
Suspend execution until other fibers are finished.
Constructors
Instance methods
Increments the counter by how many fibers we want to wait for.
Can be called at any time, allowing concurrent fibers to add more fibers
to wait for, but they must always do so before calling #done to
decrement the counter, to make sure that the counter may never
inadvertently reach zero before all fibers are done.
Decrements the counter by one. Must be called by concurrent fibers once they have finished processing. When the counter reaches zero, all waiting fibers will be resumed.
Same as #wait but only waits until timeout is reached. Returns true
if the counter reached zero; returns false if timeout was reached.
Suspends the current fiber until the counter reaches zero, at which point the fiber will be closed.
Can be called from different fibers.