Re: thread cancellation



On Mon, 2003-09-15 at 12:21, Colin Walters wrote:
> Has anyone else solved this problem in a different way?  Opinions?

It seems to me that a good way to solve this is by sending signals to
the threads.  Then you can build a signal handler in the thread to
handle the interruption.

Now, that comes with warnings.  There is a chance you'll be in the
middle of another routine.  While it is unlikely that the functions
you've called will have allocated memory you can't get to, it is likely
that you can't use any other routines in the library to remove the
memory that is allocated by the library.

So, if you allocated all the memory yourself, shutting down shouldn't be
a problem.  But, you've probably screwed up the datastructures that your
deleting.

                --Ted

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]