Re: Thread info
From: Matt Humphrey (matth_at_ivizNOSPAM.com)
Date: 02/03/05
- Next message: Paul Chapman: "Re: All those constructors..."
- Previous message: Ike: "auto-closing dialog"
- In reply to: nialltimpson: "Thread info"
- Next in thread: nialltimpson: "Re: Thread info"
- Reply: nialltimpson: "Re: Thread info"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 3 Feb 2005 15:17:03 -0500
"nialltimpson" <niall_mulhare@hotmail.com> wrote in message
news:1bd72a439baf98b8be2fe489875b08ab@localhost.talkaboutprogramming.com...
> I was wondering is to possible to differenciate between threads, like can
I
> access an thread which is allready in execution. What I have is an applet
> which is connected to my server which in turn creates an thread for that
> client, now when I close the applet and open another one it creates the
> thread, but I want to do is instead of creating another one is let it join
> back in with the old thread. Im sorry for the vague description. If you
> understand I would be greatfull.
It really depends on what you mean by joining back in with the old one. It
is common practice for a server to have a thread pool. When a client
connects, a thread is selected from the pool to service that client. When
the client disconnects, the thread is returned to the pool. Once the thread
is returned to the pool it is back in its idle state and it's not really
doing anything aside from waiting for the next request. In this way you
can pre-populate the pool with some threads and there is likely to be one
ready when a client connects; there are other benefits.
Is there a reason you need a continuous connection and that a request-based
connection (HTTP) using existing J2EE server technology would not be
appropriate? These tools tend to already have such facilities built in.
Cheers,
Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/
- Next message: Paul Chapman: "Re: All those constructors..."
- Previous message: Ike: "auto-closing dialog"
- In reply to: nialltimpson: "Thread info"
- Next in thread: nialltimpson: "Re: Thread info"
- Reply: nialltimpson: "Re: Thread info"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|