On Thursday, July 12, 2001, at 08:51 AM, Michael Scheibler wrote:
>
> Well it's some time ago, but now I have this problem with unregistered
> threads again. Actually it seems to be a bug in GNUstep's exception
> handling, which uses _NSAddHandler and _NSRemoveHandler:
>
> void
> _NSAddHandler (NSHandler* handler)
> {
> NSThread *thread;
>
> thread = GSCurrentThread();
> // didn't call GSRegisterCurrentThread()
> // -> thread is NULL
> handler->next = thread->_exception_handler;
> thread->_exception_handler = handler;
> }
>
> void
> _NSRemoveHandler (NSHandler* handler)
> {
> NSThread *thread;
>
> thread = GSCurrentThread();
> // still didn't call GSRegisterCurrentThread()
> // -> thread most likely will be NULL, too
> thread->_exception_handler = thread->_exception_handler->next;
> }
I don't understand the nature of the problem.
If you use non-GNUstep threads, it's your responsibility to register
those threads before using any other GNUstep code, so exception
handlers shouldn't register them.
Are you worried about the possibility of an exception being raised
when you call GSRegisterCurrentThread()? I guess these methods really
should check to see if a thread exists and raise an exception (to be
handled by the default handler) if it doesn't.
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep