Boost logo

Boost :

From: Alexander Terekhov (TEREKHOV_at_[hidden])
Date: 2002-08-12 12:22:51

Dale Peakall (dale.peakall_at_[hidden]) wrote:
> Most C libraries have problems with exception-safety in C++,
> because the concept doesn't exist in C.

Well, obviously [and "to begin with"], you've never heard of
things along the lines of "#include <pthread_exception.h>"...> what /shlib/|grep DECthreads
         DECthreads version V3.18-138 May 12 2002> cc -pthread -o ceh ceh.c> ./ceh


Hi There! Greetings from the ``yellow zone.''

Exception: Attempted stack overflow was detected (dce / thd)

Indeed. ;-)> cat ceh.c

#include <stdio.h>
#include <memory.h>
#include <pthread.h>
#include <pthread_exception.h>

void operation()
  char buffer[128];
  memset( buffer, 0, sizeof( buffer ) );

void* my_thread( void* p )
  TRY {
    printf( "\nGo...\n\n" );
    printf( "Hi There! Greetings from the ``yellow zone.''\n\n" );
    pthread_exc_report_np( THIS_CATCH );
    TRY {
    CATCH( pthread_stackovf_e ) {
      printf( "\nIndeed. ;-)\n\n" );
  return NULL;

int main()
  pthread_t tid;
  pthread_create( &tid, NULL, &my_thread, NULL );
  pthread_exit( NULL );


Boost list run by bdawes at, gregod at, cpdaniel at, john at