From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ye Liu" To: Scott McCaskill Cc: pthreads-win32@sourceware.cygnus.com Subject: Re: catch (...) Date: Sun, 05 Aug 2001 22:12:00 -0000 Message-id: <3B6E26B6.191DF995@tibco.com> References: <3B6722DF.475EAC12@tibco.com> <014d01c11a0f$526d4910$3e0f020a@hand.local> <3B6732F5.2EE3990F@tibco.com> <019101c11a13$7a067970$3e0f020a@hand.local> <3B6E1D01.192DBC17@tibco.com> <00ae01c11e36$c4c02ac0$3c194442@acme> X-SW-Source: 2001/msg00096.html Thanks. --ye Scott McCaskill wrote: > pthreads-win32 uses exceptions to implement thread cancellation. This means > that, in the threads that you create, if your code (or any code you call) > uses catch(...), it may inadvertantly circumvent this thread cancellation > mechanism. This is why there is a warning telling you to use PtW32CatchAll > in place of catch(...). > > If you look at the bottom of pthread.h, you will see that PtW32CatchAll is > defined as follows: > > #define PtW32CatchAll \ > catch( ptw32_exception & ) { throw; } \ > catch( ... ) > > ----- Original Message ----- > From: "Ye Liu" > To: > Sent: Sunday, August 05, 2001 11:28 PM > Subject: catch (...) > > > Greets, > > > > I have a question on using pthread-win32 in C++: > > > > When I compiling my code with try and catch, I got > > > > "When compiling applications with MSVC++ and C++ exception handling: > > Replace any 'catch( ... )' with 'PtW32CatchAll' in POSIX threads > > if you want POSIX thread cancelation and pthread_exit to work." > > > > in compiling. > > > > May I know what PtW32CatchAll is ? A catch comply certain standard from > > Microsoft? I cannot find any information in MSDN. Can someone give me some > > details for it? > > > > Regards, > > > > --ye > > > > -- Ye Liu Tel(O) 650-846-5228