Replies: 1 comment
-
|
Using a MessageChannel like in this example worked. 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I'm trying to send messages from my worker to the parent using parentPort.postMessage, but each time I send a message I got the error:
Error: Unexpected message on Worker: { type: 'IMPORT_UPDATE', payload: { table: 'Table', totalDataSize: 45684934, totalDataRead: 16384 } }I'm sending the message this way:
I have a listener on my pool ready to handle those messages but it seems it's never called:
pool.on('message', handleMessage)I'm using node v16.15.1.
I'm not sure what exactly means "Unexpected message on Worker".
Beta Was this translation helpful? Give feedback.
All reactions