Project

General

Profile

Actions

Feature #9420

closed

warn and puts should be atomic

Added by normalperson (Eric Wong) about 10 years ago. Updated over 3 years ago.

Status:
Closed
Target version:
-
[ruby-core:<unknown>]

Description

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)
-        */

Related issues 2 (0 open2 closed)

Related to Ruby master - Feature #9323: IO#writevClosedGlass_saga (Masaki Matsushita)Actions
Has duplicate Ruby master - Feature #14042: IO#puts: use writev if availableClosedActions
Actions #1

Updated by nobu (Nobuyoshi Nakada) about 10 years ago

  • Description updated (diff)

Updated by Glass_saga (Masaki Matsushita) about 10 years ago

  • Assignee set to Glass_saga (Masaki Matsushita)
Actions #3

Updated by shyouhei (Shyouhei Urabe) over 6 years ago

Actions #4

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Has duplicate Feature #14042: IO#puts: use writev if available added
Actions #5

Updated by naruse (Yui NARUSE) about 6 years ago

  • Target version deleted (2.2.0)

Updated by Glass_saga (Masaki Matsushita) over 3 years ago

  • Status changed from Open to Closed

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0