Re: reuse a thread which is no longer "alive"
From: Jeff Rhines (jrhines_at_despammed.com)
Date: 02/26/04
- Next message: nos: "Re: Getting system user info from java app"
- Previous message: Rob: "Re: Tomcat - default context question.."
- In reply to: sayoyo: "Re: reuse a thread which is no longer "alive""
- Next in thread: Jeff Rhines: "Re: reuse a thread which is no longer "alive""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 26 Feb 2004 21:58:49 GMT
Ok, i'm making a unit-tested component to do this, for fun. What are you
going to use it in?
"sayoyo" <dontwantspam@yahoo.com> wrote in message
news:UNs%b.9040$ee3.451073@news20.bellglobal.com...
> Yes, Please, I would like to have a look on it.
>
> And do you know the internal design of a "Thread", when you creates a
> "Thread" you can put a "Runnable" as argument. What the "Thread" does
> exactly with the "Runnable"?
>
> What is different between using "start()" and "run()"?
>
> Thanks you very much:)!!!!
>
> Sayoyo
>
>
> "Jeff Rhines" <jrhines@despammed.com> a écrit dans le message de
> news:gC9%b.2471$OH4.1117@fe2.texas.rr.com...
> > 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: nos: "Re: Getting system user info from java app"
- Previous message: Rob: "Re: Tomcat - default context question.."
- In reply to: sayoyo: "Re: reuse a thread which is no longer "alive""
- Next in thread: Jeff Rhines: "Re: reuse a thread which is no longer "alive""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|