[omniORB] Run an ORB in a thread but keep its reference

bjorn rohde jensen bjensen@fastmail.fm
Wed Oct 30 19:57:00 2002


Hi Laurent,

  I am not entirely sure, why or what is actually
going on with your code, but i am highly sceptical
of the use of pointers to member functions as the
start up function in pthread_create.
  A pointer to a member function is something quite
different than a pointer to a function, which
pthread_create requires. I am not even sure, how
and if one can convert between them portably.
  The signature of a member function in many
implementations of C++ take an implicit initial
this parameter pointing to the data of the object
the method was invoked on.
  I would guess, that the this pointer used to
access your member variables has not been
correctly initalised. The segfault most likely
has nothing to do with omniORB as such. Why dont
you use a simple function taking a pointer to
your aDataSourceServer class and have it invoke
the runServer method? You can portably cast pointers
to object to void * and back in C++....

Yours sincerely,

Bjorn