Issue #9420 has been updated by Glass_saga (Masaki Matsushita).

Status changed from Open to Closed

For now, warn and puts already use writev if available.

----------------------------------------
Feature #9420: warn and puts should be atomic
https://bugs.ruby-lang.org/issues/9420#change-87279

* Author: normalperson (Eric Wong)
* Status: Closed
* Priority: Normal
* Assignee: Glass_saga (Masaki Matsushita)
----------------------------------------
Since we added use of writev in r44618, we should make warn/puts atomic.
It would make development of multiprocess/multithreaded processes easier,
I think it was intended to be atomic based on old comments in io.c:

```
-       /*
-        * xxx: use writev to avoid double write if available
-        * writev may help avoid context switch between "a" and "\n" in
-        * STDERR.puts "a" [ruby-dev:25080] (rebroken since native threads
-        * introduced in 1.9)
-        */
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>