| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Mukeh,_______________________________________________
I had a read of the pthread docs.
In your first program the thread should die at one of the cancellation points. According to the docs this includes nanosleep().
You have the 'testcancel()' function in there but instantly passed through it before the request to cancel is made the main() thread.
If you move the testcancel() into your wait loop the child thread cancels nicely.
So, it seems that in OSX nanosleep() for some reason is not being counted as a cancellation point - contrary to the man page documentation. :-(
Regards,
aid
| References: | |
| >POSIX threads - pthread_cancel (From: mukesh bafna <email@hidden>) | |
| >Re: POSIX threads - pthread_cancel (From: Adrian Bool <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.