https://bz.apache.org/bugzilla/show_bug.cgi?id=58411
--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> --- It's worth pointing-out that nowhere in java.io.PrintWriter does it say anything about being thread-safe, nor does its superclass, java.io.Writer. Also, none of the methods are synchronized. Internally to these methods, there are synchronized blocks but that seems to be an implementation detail. If the CoyoteWriter is not thread-safe, it should probably documented as such, but it's completely reasonable to leave it without synchronization: adding the overhead of synchronization to every write() would be unreasonable for what is usually a rare use-case. You are already having to manage your threads to ensure that you write things to the response in the right order (right?) so you may as well use that same mechanism to provide thread-safety to your use of CoyoteWriter. A better method of communication would be to queue your writes (using a thread-safe queue) and have a single thread write to the response output stream. Right now, it sounds like the wild west in your code. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org