When a task wants to start several subtasks and wait until one or all of them are finished, a lot of boilerplate is needed.
"all"
- A waits for B and C
- C finishes first, A keeps waiting
- B finishes, A continues
"any"
- A waits for B or C
- C finishes first, A continues, B is aborted
lock management
- if A has the lock, B and C get the chance to acquire it as their first action
- if A had the lock before waiting, it should automatically be acquired again before A continues
When a task wants to start several subtasks and wait until one or all of them are finished, a lot of boilerplate is needed.
"all"
"any"
lock management