Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1184214

printing methods are not all synchronized

XMLWordPrintable

    • 0.9internal
    • sparc
    • solaris_2.3
    • Not verified

      The println methods in class PrintStream
      are not all synchronized. The result is that
      if two threads try to simultaneously
      use println() you can sometimes end up with another print printing
      between the first part of the string and the newline character.
      The bad output looks like this:

      Done reading http://tachyon/~csw/graphics/csw.gifD
      one reading http://tachyon/~csw/graphics/csw.gifD
      one reading http://tachyon/~csw/graphics/csw.gifD
      one reading http://tachyon/~csw/graphics/csw.gif
      Done reading http://tachyon/~csw/graphics/csw.gifD
      one reading http://tachyon/~csw/graphics/csw.gifD
      one reading http://tachyon/~csw/graphics/csw.gifD
      one reading http://tachyon/~csw/graphics/csw.gif

            duke J. Duke
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: