Re: reuse a thread which is no longer "alive"
From: Jeff Rhines (jrhines_at_despammed.com)
Date: 02/25/04
- Next message: Edward Patrick: "Wildcards in <url-pattern>"
- Previous message: Ryan Stewart: "Re: Passing objects (not stones)"
- In reply to: sayoyo: "reuse a thread which is no longer "alive""
- Next in thread: sayoyo: "Re: reuse a thread which is no longer "alive""
- Reply: sayoyo: "Re: reuse a thread which is no longer "alive""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Feb 2004 22:47:40 GMT
What i've done in the past is use a queue that i fill with runnables, and
have dequeue threads that wait for something to be in the queue. When there
is a runnable in the queue, one of the threads grabs it and executes it,
then goes back to trying to dequeue something out of the queue. Cool, eh?
Let me know if you need more implementation details.
Jeff
"sayoyo" <dontwantspam@yahoo.com> wrote in message
news:Uz3%b.11378$253.909039@news20.bellglobal.com...
> Hi,
>
> Is there some way that we can reuse a thread by replacing the runnable
> object of the thread? like a thread is not "alive" anymore, then we remove
> the runnable object(is it possible????) and then run it again.
>
> Thanks you very much
>
> Sayoyo
>
>
- Next message: Edward Patrick: "Wildcards in <url-pattern>"
- Previous message: Ryan Stewart: "Re: Passing objects (not stones)"
- In reply to: sayoyo: "reuse a thread which is no longer "alive""
- Next in thread: sayoyo: "Re: reuse a thread which is no longer "alive""
- Reply: sayoyo: "Re: reuse a thread which is no longer "alive""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|