Re: CORBA_ORB_run() and friends.



> > So, is there a way to poll ORBit rather than have it run its own main
> > loop?
> 
> Not that I've ever found (not without using threads, anyway). However, ORBit
> can be convinced to use the glib main loop, which would allow you to
> register your own event sources and timeout functions and so on. I can't
> remember how to make it use the glib main loop though... Search the mail
> archives for this list, it's been mentioned a few times before.

This may be of interest to other readers here.. After delving around in
the ORBit CORBA_ORB_run code, I appear to have found a way to poll ORBit
within my application's own main loop, as follows:

Before the main loop:
	extern gboolean orb_server_keep_running;
	
	ORBit_custom_run_setup(orb, &ev);
	assert(ev._major == CORBA_NO_EXCEPTION);
	orb_server_keep_running = TRUE;

In the main loop:
	giop_main_iterate(FALSE);

It certainly seems to work so far.

Hope this helps some of you,
Gareth





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]