Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSworker_threads memory sharingSingle-choice MCQ

What happens to the original ArrayBuffer in the main thread after this postMessage with a transfer list runs?

const { Worker } = require('worker_threads'); const buf = new ArrayBuffer(1024); worker.postMessage(buf, [buf]); console.log(buf.byteLength);