On Aug 9, 2011, at 6:53 PM, Ben Stott wrote: > ... > The overhead is relatively minimal if the exception isn't thrown - in fact, > if the exception isn't thrown it's more likely than not that the overhead > will be less than checking a return value more once. OTOH, a thrown exception > the overhead balloons out - but I'd argue if something has gone wrong enough > for an exception to be thrown, you can probably justify the overhead. > However, I didn't know that about Macs - I was under the impression that an > exception occurring in a thread, blocking or not, would be held by the same > thread and at worst force a return of the thread if it weren't handled?
The issue is that blocks operate outside the normal (POSIX) threading model, and so code that might throw an exception could be running in a completely different thread with a completely different stack (while the code that dispatched the block(s) waits for the work to complete...) ________________________________________ Michael Sweet, Easy Software Products
_______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
