* Checks for messages on the syncCommPort and handles them asynchronously.
()
| 184 | * Checks for messages on the syncCommPort and handles them asynchronously. |
| 185 | */ |
| 186 | function checkForMessages() { |
| 187 | immediate = setImmediate(checkForMessages).unref(); |
| 188 | // We need to let the event loop tick a few times to give the main thread a chance to send |
| 189 | // follow-up messages. |
| 190 | const response = receiveMessageOnPort(syncCommPort); |
| 191 | |
| 192 | if (response !== undefined) { |
| 193 | PromisePrototypeThen(handleMessage(response.message), undefined, errorHandler); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | const unsettledResponsePorts = new SafeSet(); |
| 198 |
no test coverage detected
searching dependent graphs…