Re: exception not caught? (aborting)
Re: exception not caught? (aborting)
- Subject: Re: exception not caught? (aborting)
- From: Ethan Tira-Thompson <email@hidden>
- Date: Sat, 28 Mar 2009 23:47:38 -0400
On Mar 28, 2009, at 9:44 PM, Avi Drissman wrote:
Yeah, I'm debating about not allowing thread cancellation checks on scope exit (i.e. destructors)... it unfortunate because scope-based resource ownership is a pretty fundamental C++ism, and checking cancellation is an intuitive thing to do after releasing resources. (i.e. close() is a cancellation point on other unix systems)
This case may be a good exception (haha) to that rule because the exception serves a special purpose and is not meant to be caught. I just have to be careful in my own testcancel() not to throw another thread-cancel if I'm already in the middle of a thread-cancel. And then it's safe because no one else will throw an exception from their destructor because everyone else follows the rule, right? ;)
Turns out thread cancellation is a little tricky to implement ;)
Thanks, -Ethan
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden