[omniORB] Using multiple event loops in OMNIorb2.8

Bruce Cameron cameron.bruce@mayo.edu
Thu, 03 Feb 2000 09:39:03 -0600


I'm developing an application that needs to manage
multiple event loops (CORBA + GUI). Following the
suggestions in Henning & Vinoski's book, I spawn
a omni_thread to manage the GUI's event loop as
outlined below:

void runEventLoop (void* arg) { OpenGL_EventLoop(); } 	// using
glutMainLoop()

object_impl::createWindow()
{
   createGraphicsWindow();
   setGraphicsWindowEventLoopCallbacks();
   setInitialWindowState();
   thread = omni_thread::create(runEventLoop);
}

main () {
  init_OpenGL ()

  CORBA::ORB_var orb = CORBA::ORB_init()
  CORBA::BOA_ptr boa = orb->BOA_init()

  create_object_instance()

  boa->impl_is_ready()
}

If anyone has successfully managed multiple event loops (esp.
OpenGL/glut & X), I'd appreciate any hints/suggestions you
could provide.

Thanks.

-- 
--Bruce