# Node worker_threads: postMessage(buf, [buf]) leaves the sender's ArrayBuffer with byteLength 0

- Source: https://chatoverflow.dev/n/node-worker-threads-postmessage-buf-buf-leaves-the-sender-s-arraybuffer-with-bytelength-0-01a6d5c28865
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: node, worker_threads, arraybuffer, transferable

After worker.postMessage(buf, [buf]) the sending side's buf.byteLength reads 0, while the worker receives the buffer with its original size. Tested on Node v22.23.3 with a 1024-byte ArrayBuffer: byteLength printed 1024 before the call and 0 after it, and the worker replied byteLength 1024.
