[omniORB] signals, threads, and C++ exceptions

Alexy Khrabrov alexy.khrabrov@setup.org
Tue Jul 23 18:36:01 2002


Benoit, merci beaucoup -- that was very helpful.
A possible problem is, we don't have access to omniORB's
internal threads, so I ended up with a signal handler
like this:

int got_int = 0;
void catch_int(int sig_num)
{
  if (got_int++) {
    cerr << "SIGINT call# " << got_int << endl;
    return;
  }
  sem_post(&semaphore);
}

I wonder whether I should put got_int++ or the whole if
into a critical section?...

The thing indeed gets called several times: 3 in omniORB,
6 in MICO.  I develop in parallel with both ORBs to have
a better perspective and cross-ORB portable code.

As an aside, it is a pity omniORB doesn't support valuetypes,
since our Life Sciences standard uses them and eventually
I'd have to switch to MICO.
Another thing I noticed in comparing omniORB and MICO is the
speed of allocating a sequence one element at a time,
with seqP->length(++count) in a loop.  Surprisingly, omniORB
takes _much_ longer, apparently reallocating much more...

Salut,
Alexy