Sealed
Private
c_Signals are used to notify waiting for a function to return
Private
counter_Record how many async awaits are in progress
Private
_doOptional
oncompleted: VoidCallbackExecute function f after counter++, and execute counter-- after function f is done
If a promise is returned, the function f is completed after the promise is executed, otherwise the function f is already completed
function to execute
Optional
oncompleted: VoidCallbackfunction to execute when f is done
Generated using TypeDoc
A WaitGroup waits for a collection of async process to finish.
Remarks
The main process calls Add to set the number of async process to wait for. Then each of the async process runs and calls done when finished. At the same time, wait can be used to block until all async process have finished.