Re: work_pending/perform_work



dthompson@characterlink.net (Darrin Thompson) writes:

> Perl worked for me. This little snippet from the ORBit perl bindings is 
> kind of interesting... Would this work in C?
> 
> SV *
> work_pending (self)
>     CORBA::ORB self
>     CODE:
>     RETVAL = newSVsv(g_main_pending() ? &PL_sv_yes : &PL_sv_no);
>     OUTPUT:
>     RETVAL
> 
> void
> perform_work (self)
>     CORBA::ORB self
>     CODE:
>     g_main_iteration(TRUE); /* Is the FALSE here correct? */

Hmmm, I matched the comment and the code together there well  ;-)

Only if you steal the other little snippit of code from the
perl bindings that makes ORBit use the GLib main loop. 
(If you are using libgnorba, then that also makes ORBit use
the GLib main loop.)

Future versions of ORBit will most likely use the GLib main
loop by default, but that is not the case currently.

Regards,
                                   Owen





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