Subj : Re: Avoiding synchronization (pthreads) To : comp.programming.threads From : Joe Seigh Date : Thu Mar 03 2005 06:50 am On Wed, 02 Mar 2005 22:33:26 -0600, Ian Pilcher wrote: > > I'm interested in hearing how people handle this situation in a > professional environment, where the code has to get out the door -- > ignore the possibility that the call may fail, fill the code with aborts > (or something equally drastic), or something incredibly clever that I > haven't thought of. > abort() is usually the way to go. There is no recovery in most cases. Some of it is the lock code dynamically checking for statically known conditions which means a program logic error. You don't dynamically recover from program logic errors. The other usual suspects are memory corruption from which there's no recovery either. A better interface would have been throwing an exception so the calling program didn't have to pretend it could handle the error but pthreads is a C api, not a C++ api. -- Joe Seigh .