[Asterisk-java-devel] possible bug??
Brought to you by:
srt
From: Ngo-Vi Hoai-A. <ho...@gm...> - 2008-09-18 14:08:54
|
Hi, I've experimented with setting poolSize and maxPoolSize on my PC (Windows XP Service Pack 3, Java 1.6.0_06, Asterisk Java 0.3.1) and found out that ThreadPoolExecutor seemed not to work properly. I've set poolSize to 1 and maximumPoolSize to 2 but the DefaultAgiServer passes only a single call to the AgiScript. Another calls will be put into the LinkedBlockingQueue and will pass to the script as soon as the previous call gets out the AgiScript. I've modified the code to set the pool by calling pool = Executors.newCachedThreadPool(new DeamonThreadFactory()) and the DefaultAgiServer passes all simultaneous calls to AgiScript (well! setting like this the pool will have no upper bound but for my test this issue is ignorable ;-) ). Is there any known bug regardings ThreadPoolExecutor?? Modified source code is attached. best regards |