pinojs / thread-stream

A streaming way to send data to a Node.js Worker Thread
MIT License
229 stars 23 forks source link

feat: post message to worker when message event is emitted #145

Closed 10xLaCroixDrinker closed 5 months ago

10xLaCroixDrinker commented 6 months ago

PR 1 of 3 for pinojs/pino#1925

Relates to pinojs/pino#1930 Relates to pinojs/pino-abstract-transport#90

Adds the ability to post a message in the worker by emitting a message event on the stream. This isn't strictly required for the feature, but considering the intention to make this.worker private. I didn't think it would be best to call stream.worker.postMessage directly.

10xLaCroixDrinker commented 6 months ago

@mcollina can we ship this?