On 2/16/06, Mike Orr <[EMAIL PROTECTED]> wrote:
>
> On 2/16/06, Kevin Dangoor <[EMAIL PROTECTED]> wrote:
> >
> > On 2/15/06, Mike Orr <[EMAIL PROTECTED]> wrote:
> > > Then I discovered if the server is not handling a request, pressing
> > > ctrl-C quits all the threads.  But if it is handling a request, the
> > > threads remain.  If I then press Stop in the browser, the threads
> > > still remain, and I have to kill them.  Whereas if I kill the threads
> > > with extreme prejudice, the browser suddenly times out.
> > >
> > > I'd expected the threads to just halt when I press ctrl-C and the
> > > browser to time out immediately.  But I haven't used a multithreaded
> > > framework for a while so I'm not sure this is possible.  Still, the
> > > main thread can tell the others to hurry up and exit, no?
> >
> > You can use a global variable that tells the other threads to exit
> > when they get around to it. I don't know of a way for the "main
> > thread" to "kill" the other threads.
>
> That's one thing I never understood.  Java does it, but Python claims
> it's impossible.

Linux have pthread_kill(), but maybe it's too dependent on platform
and Python doesn't  support it.

Java, AFAIR, does its own thread implementation.... but I may be wrong.

I'm also looking for a solution in this area :-(

--
Gustavo Sverzut Barbieri
--------------------------------------
Computer Engineer 2001 - UNICAMP
Mobile: +55 (19) 9165 8010
 Phone:  +1 (347) 624 6296; [EMAIL PROTECTED]
Jabber: [EMAIL PROTECTED]
  ICQ#: 17249123
   MSN: [EMAIL PROTECTED]
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to