pinojs / thread-stream

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

Avoid zalgo when calling flush(). #72

Closed mcollina closed 2 years ago

mcollina commented 2 years ago

Flush could error both synchronously and asynchronously, making it extremely hard to handle both cases. In case of a race condition it could even make the error uncatchable.

My understanding is this should fix https://github.com/pinojs/pino/issues/1375. However this is yet to be seen. It definitely fixes some flakiness in our CI.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2013234290


Changes Missing Coverage Covered Lines Changed/Added Lines %
index.js 4 5 80.0%
<!-- Total: 4 5 80.0% -->
Totals Coverage Status
Change from base Build 1944840406: -1.007%
Covered Lines: 290
Relevant Lines: 335

💛 - Coveralls
coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 2013234290


Changes Missing Coverage Covered Lines Changed/Added Lines %
index.js 4 5 80.0%
<!-- Total: 4 5 80.0% -->
Totals Coverage Status
Change from base Build 1944840406: 0.3%
Covered Lines: 292
Relevant Lines: 335

💛 - Coveralls