(eventHandler)
| 39 | } |
| 40 | |
| 41 | flush(eventHandler) { |
| 42 | eventHandler.deactivatePortMessages(); |
| 43 | // wait for other incoming port connects |
| 44 | setTimeout(async () => { |
| 45 | const {id} = parseViewName(this.port.name); |
| 46 | // check the addPort sequence and wait for last addPort action with the same id to be finished before flush |
| 47 | const addPortAction = this.addPortSequence.queue.findLast(element => element.args[0].name.includes(id)); |
| 48 | if (addPortAction) { |
| 49 | await addPortAction.promise; |
| 50 | } |
| 51 | this.#flushEvent(eventHandler); |
| 52 | }, 50); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | class ControllerTransaction { |
no test coverage detected