This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: phread_join problem


Jerry D. Hedden wrote:

> You can't join to a cancelled thread.


Cannot you? From reading the posix thread documentation I have an impression that you can.


See for instance
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_join.html

It says:

> The pthread_join() or pthread_detach() function should eventually be called for every thread that is created with the detachstate attribute set to PTHREAD_CREATE_JOINABLE so that storage associated with the thread may be reclaimed.


Moreover, there is also a thread return status PTHREAD_CANCELED that is returned by pthread_join when the thread exits due to pthread_cancel request. See the paragraph "Thread Cancellation Cleanup Handlers" at http://www.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_09.html



Artem Alimarine.



-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]