* Close the queue - no more messages can be pushed
()
| 285 | * Close the queue - no more messages can be pushed |
| 286 | */ |
| 287 | close(): void { |
| 288 | logger.debug(`[MessageQueue2] close() called`); |
| 289 | this.closed = true; |
| 290 | |
| 291 | // Notify any waiting caller |
| 292 | if (this.waiter) { |
| 293 | const waiter = this.waiter; |
| 294 | this.waiter = null; |
| 295 | waiter(false); |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * Check if the queue is closed |