| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
However, when I try to call pthread_mutex_unlock from the cleanup function that results from the eventual pthread_testcancel, it returns an error "Operation not permitted".Sigh... I have to take this back — testing in a simplified piece of test code does seem to work on both 10.4 and 10.5. So I'm not sure what's going on there with my "real" code.
Is there any particular reason you don't do the semi-standard unix method of using select() or equivalent on your socket together with a pipe, and then write a byte to the other end of the pipe from whoever wanted to stop the thread in the first place? No messing with signals needed.Unfortunately, I'm given an std::iostream for the input, so I can't select on that :(
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: http://lists.apple.com/mailman/options/darwin-dev/email@hidden
| References: | |
| >pthread_mutex_unlock not permitted in signal handler? (From: Ethan Tira-Thompson <email@hidden>) | |
| >Re: pthread_mutex_unlock not permitted in signal handler? (From: Lassi Tuura <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.