[nodejs] What is the relationship between writableStream.highwatermark in nodejs and PIPE_BUF in POSIX specification

2014-06-08 Thread WooD Fung
if i set the highwatermark to 0 and each write is less PIPE_BUFF, can i say that it must be atomic -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting

[nodejs] What is the relationship between writableStream.highwatermark in nodejs and PIPE_BUF in POSIX specification

2014-06-08 Thread Conrad Pankoff
They're completely unrelated. You're correct also in your assumption that writes are not (guaranteed to be) atomic. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mai

[nodejs] What is the relationship between writableStream.highwatermark in nodejs and PIPE_BUF in POSIX specification

2014-06-06 Thread WooD Fung
According to POSIX specification, if you write less than the size of PIPE_BUF, this operation shall be atomic. The default writableStream.highwatermark in nodejs is 16 kilobyte. writableStream.write will return false when the total size of the being flushed data is greater this value. Let sa