%PDF- %PDF-
| Direktori : /home2/rezakur1/api.rezakurnia.com/zh-router/node_modules/thread-stream/test/ |
| Current File : //home2/rezakur1/api.rezakurnia.com/zh-router/node_modules/thread-stream/test/report-thread-name.js |
'use strict'
const { Writable } = require('stream')
const { threadName, parentPort } = require('worker_threads')
module.exports = function () {
parentPort.once('message', function ({ port }) {
port.postMessage({ threadName })
})
return new Writable({
write (chunk, encoding, callback) {
callback()
}
})
}