OSDN Git Service

Pulled the ExecutorService stuff out and replaced it with a
authorPSpeed42@gmail.com <PSpeed42@gmail.com@75d07b2b-3a1a-0410-a2c5-0572b91ccdca>
Fri, 5 Aug 2011 07:55:04 +0000 (07:55 +0000)
committerPSpeed42@gmail.com <PSpeed42@gmail.com@75d07b2b-3a1a-0410-a2c5-0572b91ccdca>
Fri, 5 Aug 2011 07:55:04 +0000 (07:55 +0000)
commit0a3e724cd5726ce277e19c92180a65307625dd5d
tree60f25581c6ec26e2b30d1bb53b7d08f64005a652
parent125916e5468ebedaf95a3c9949cb59a46f426aa0
Pulled the ExecutorService stuff out and replaced it with a
plain single thread.  This gives more control over the queuing
behavior as with an ThreadPoolExecutor it is difficult to implement
blocking execute() behavior.  Also, this avoids creating an
extra object per-message.
Anyway, this code now implements a blocking queue instead of
a boundless queue.  It's set to 16,000 messages which should only
bottom out in the worst of cases.  I was seeing it in the throughput
tests where the sockets were backing up and the queues were
consuming all of the heap until an out of memory error occurred.
Outbound messaging is only throttled this way on the client.
Servers typically wouldn't do this sort of spamming anyway.

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@7977 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
engine/src/networking/com/jme3/network/base/ConnectorAdapter.java