Opens the gate and notifies all the waiters.
| 35 | public: |
| 36 | // Opens the gate and notifies all the waiters. |
| 37 | void open() |
| 38 | { |
| 39 | synchronized (mutex) { |
| 40 | opened = true; |
| 41 | cond.notify_all(); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | // Blocks the current thread until the gate has been opened. |
| 46 | void wait() |