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

You transfer (not clone) an ArrayBuffer to a worker via `postMessage(buf, [buf])`. After the call, what is the precise state of the original `buf` in the sending thread, at the memory level?

const buf = new ArrayBuffer(8); worker.postMessage(buf, [buf]); console.log(buf.byteLength); // 0