* Signal that a participant has reached the barrier. * * The barrier will be resolved once `targetCount` participants have reached it.
()
| 22 | * The barrier will be resolved once `targetCount` participants have reached it. |
| 23 | */ |
| 24 | public signal(): void { |
| 25 | this.currentCount += 1; |
| 26 | if (this.currentCount === this.targetCount) { |
| 27 | this.resolve(); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Wait for the barrier to be resolved. |
no test coverage detected