Subj : Re: pthread function behavior in C++ program To : comp.programming.threads From : wij Date : Sun Jun 12 2005 12:34 pm David Butenhof wrote: >The biggest problem people have when getting started is in failing to >realize that the POSIX standard, and its interfaces, are C not C++. That >means for example that you can't pass a class member function to >pthread_create(), or pthread_init(). You need a function with 'extern >"C"' binding; you can pass an object by address (watch the casting!) to >that function, and have IT invoke a method. While some compilers will >let you pass methods, or 'static' class member functions, neither >standard says that will work -- and since it is after all a C language >interface the C++ standard says not to do it. Yes, you fixed a bug of my previous coding. >The situation can get better, and there are C++ standards people working >on defining how to make the C++ language better for threading; but it's >not really all that bad now. For the moment before The Standard, is it defensive enough to rewrite my C++ programs on the base known -fact?- that: 1. C system functions that are cancellation points implemented in the C++ library(Linux Fedora3+NPTL) will initiate stack unwinding on thread cancellation. 2. The cancellation initiated stack unwinding might provide no type to catch. 3. The final stuff as how to handle the unspecifed throw type is also yet unspecified. I just want something like this definite, as those that I could have read so far just says similar things but definite to what I can use. .