Re: [Asterisk-java-devel] possible bug??
Brought to you by:
srt
From: Ngo-Vi Hoai-A. <ho...@gm...> - 2008-09-19 01:57:43
|
Hi, it works fine with 1.0.0 SNAPSHOT. It was likely a side effect of LinkedBlockingQueue. I've subtituted LinkedBlockingQueue with SynchronousQueue as in the latest SNAPSHOT and it also works fine with 0.3.1. Having a flexible cached pool could be (at least sometimes ;-)) a good idea. Can you include this to the implementation. Stefan Reuter schrieb: > Hi, > > thanks for your report. > Can you try the latest snapshot of Asterisk-Java 1.0.0? I think we've > fixed that bug there. > > =Stefan > > Ngo-Vi Hoai-Anh wrote: > >> 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 >> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > |