What about a kill method that requires a "destructor" function. This
would be similar to the create syntax and we could make a deal with the
programmer. We're going to give you the chance to cleanup and when that
function exits were going to assume that you have cleaned up and kill it
reguardless.
sub cleanup {
stuff that cleans up shared data here....
}
->kill("cleanup","cleanup args");
-Joshua Hoblitt
--
[EMAIL PROTECTED]
----- Original Message -----
From: "Arthur Bergman" <[EMAIL PROTECTED]>
Date: Wednesday, August 8, 2001 1:10 pm
Subject: SV: Threading semantics
> > >C) Quitting the main thread, now this kills all threads (as
> normal
> > >threading). However this usually comes at bad times. And we
> don't get
> > >proper cleanup (and segfaults9. I think we should wait for all
> threads to
> > >finish, letting the user to kill them.
> >
> > You can't necessarily guarantee that the threads will finish.
> What if one
> > of them's caught in an infinite loop, or stuck on a blocking
> system call
> > that'll never exit?
> >
> I disagree kind of, I think we should wait for all threads before
> we quit, the user must make sure all threads are stopped. Ohterwise
> we should provide ->kill().
>
> Arthur
>
>