Re: [xSocket-develop] NonBlockingConnection - EXECUTOR pool?
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2008-11-06 04:44:28
|
David,
thanks for your remark. This is a bug. I've fixed this (see trunk).
Gregor
2008/11/5 David Haubenstricker (IS - Emg Tech) <
dav...@do...>
> In the NonBlockingConnection, why is a separate connection pool used
> (EXECUTOR on line 671) rather than the workerpool that is passed in as a
> parameter? It seems that if I'm trying to control the number of running
> threads, via the workerpool, this will launch more threads than I want.
>
>
>
> 647 /**
>
> 648 * client constructor, which uses a specific dispatcher
>
> 649 */
>
> 650 private NonBlockingConnection(final InetSocketAddress
> remoteAddress, boolean waitForConnect, final int connectTimeoutMillis, final
> Map<String, Object> options, final SSLContext sslContext, final boolean
> isSecured, final IHandler appHdl, final Executor workerpool, boolean
> autoflush, FlushMode flushmode) throws IOException {
>
> 651 setFlushmode(flushmode);
>
> 652 setAutoflush(autoflush);
>
> 653 setWorkerpool(workerpool);
>
> 654
>
> 655 appHandler.set(HandlerAdapter.newInstance(appHdl));
>
> 656
>
> 657 if (waitForConnect) {
>
> 658 connect(remoteAddress, connectTimeoutMillis,
> options, sslContext, isSecured);
>
> 659
>
> 660 } else {
>
> 661 Runnable connectTask = new Runnable() {
>
> 662
>
> 663 public void run() {
>
> 664 try {
>
> 665 connect(remoteAddress,
> connectTimeoutMillis, options, sslContext, isSecured);
>
> 666 } catch (IOException ioe) {
>
> 667 onDisconnect();
>
> 668 }
>
> 669 }
>
> 670 };
>
> 671 EXECUTOR.execute(connectTask);
>
> 672 }
>
> 673 }
>
>
>
> -------------------------------------------------------------------------
> 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=/
> _______________________________________________
> xSocket-develop mailing list
> xSo...@li...
> https://lists.sourceforge.net/lists/listinfo/xsocket-develop
>
>
|