https://bz.apache.org/bugzilla/show_bug.cgi?id=58411

--- Comment #4 from Steve Davids <sdav...@gmail.com> ---
I have a distributed system that needs to collect data on each data node and
stream it back to the client in a timely manner, so I go ahead and open up
multiple concurrent InputStreams from each data node and stream it back to the
client in one OuputStream i.e. the Servlet's PrintWriter (CoyoteWriter for
Tomcat) in a rather simple callback method. I am not attempting to preserve
order as that would be a nightmarish task and isn't necessary for my use-case.

I did contemplate using a blocking queue but thought it was a premature
optimization before just trying to make my write method synchronized. The
synchronized method did the trick without a noticeable performance degradation,
so that's what I'm rolling with for the time being.

Just thought this was a bug and couldn't track down the original rational from
the file's history in GitHub. My initial thought was a speed optimization, but
I thought in recent versions of Java (1.4+) it isn't super costly.

-- 
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

Reply via email to