[omniORB] run Orb in separate thread

J-M Epitalon Jean-Marie.Epitalon at cerfacs.fr
Fri Mar 31 16:10:44 BST 2006


Hello,

I am new to CORBA and omniORB.
I try to run the orb in a separate thread. That is, when it is time to
call orb->run, I call this in a thread main function.
This causes a SEGV.

Did I something wrong ?
Could you help me, please ?

Below is an extract of the code:

////////////////////////

class omniORB_thread : public omni_thread
{
private:
    CORBA::ORB_var& orb;

public:
    omniORB_thread (CORBA::ORB_var& _orb) : orb(_orb) {}

    int run(void) {orb->run();  /* then */orb->destroy();}
};

//////////////////////////

main()
{
    CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "omniORB3");
    ...
    omniORB_thread orb_thread(orb);
    orb_thread.start();
    ...
}
-- 
Jean-Marie Epitalon
CERFACS
42, av Coriolis
31057 TOULOUSE Cedex
Tel: 05 61 19 30 72




More information about the omniORB-list mailing list