({anyProcess, channel, methodName, isSubprocess, message, strict})
| 32 | }; |
| 33 | |
| 34 | const sendMessageAsync = async ({anyProcess, channel, methodName, isSubprocess, message, strict}) => { |
| 35 | const wrappedMessage = handleSendStrict({ |
| 36 | anyProcess, |
| 37 | channel, |
| 38 | isSubprocess, |
| 39 | message, |
| 40 | strict, |
| 41 | }); |
| 42 | const outgoingMessagesState = startSendMessage(anyProcess, wrappedMessage, strict); |
| 43 | try { |
| 44 | await sendOneMessage({ |
| 45 | anyProcess, |
| 46 | methodName, |
| 47 | isSubprocess, |
| 48 | wrappedMessage, |
| 49 | message, |
| 50 | }); |
| 51 | } catch (error) { |
| 52 | disconnect(anyProcess); |
| 53 | throw error; |
| 54 | } finally { |
| 55 | endSendMessage(outgoingMessagesState); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | // Used internally by `cancelSignal` |
| 60 | export const sendOneMessage = async ({anyProcess, methodName, isSubprocess, wrappedMessage, message}) => { |
no test coverage detected
searching dependent graphs…