Menu ▾ ▴

#8 Use thread pool for TCPSession threads

open
5
2003-01-15
2003-01-15
No

I noticed that TCPSession was creating a new thread to
process the next frame. On linux this requires a new
process to be created, which isn't very efficient I
wouldn't have thought. I've knocked up a simple
singleton containing a Thread Pool (using
concurrent.jar) that TCPSession now uses. Seems to make
an improvement on my boxes for cpu usage, process
creation, and i/o transfer rate.

It's not very thorough, but could it be useful? Does it
make sense, and are there any flaws?

Discussion

  • Andrew Keedle

    Andrew Keedle - 2003-01-15

    patch

     

Log in to post a comment.