Re: simple way to register timeout functions in ORBit's-mainloop?
- From: Michael Haubenwallner <michael haubenwallner salomon at>
- To: orbit-list gnome org
- Subject: Re: simple way to register timeout functions in ORBit's-mainloop?
- Date: Mon, 02 Jun 2003 14:27:46 +0200
Hi Michael,
Michael Meeks wrote:
> Hi Michael,
>
> On Mon, 2003-06-02 at 10:51, Michael Haubenwallner wrote:
>
>>it would be nice to have a simpler way to register timeout-functions
>>with the GContext used by ORBit2, mainly to check some stop-conditions.
>
>
> Out of interest - what is the big picture requirement you're trying to
> meet here ?
Well, as i said, mainly to check some stop-condition. And, i also said,
that it "would be nice", not that it is impossible to install timers.
We control separate processes of our application using shared memory
(old, but still works well), and there is a flag in this shm which
indicates the stop-request for this process. If the process does not
stop after some time this flag got set, signals are sent to this process
to force its shutdown.
But this is not the only case:
My corba-server is some kind of a primitive transaction-manager, and it
keeps a list of active transactions. And i have to check for timed out
clients, but not always the mainloop is idle (-> linc_main_idle_add),
so i use timeout-callbacks.
>
>
>>Or, a third alternative would be to have sth. like ORBit_timeout_add()
>>to hide usage of linc/glib.
>
>
> We want to hide the linc stuff, certainly - since it's now all
> internal; but I'm mostly interested in why you want to do this - perhaps
> there is an easier way :-)
Any hints would be appreciated, since i am somewhat new on
CORBA/ORBit...
>
>
>>What do you think about this ?
>
>
> I guess - I'd rather work on implementing some of the per object policy
> stuff - eg. the existing timeout stuff in the CORBA spec, than adding
> custom hooks of this sort - but it depends what the use-case is.
>
The best way for us by now is simply to snap in our work into the
mainloop, and the problem is how to do this using quite simple
functions.
Thanks,
haubi
--
Michael Haubenwallner SALOMON Automation GmbH
Forschung & Entwicklung A-8114 Friesach bei Graz
T +43 3127 200 308 F +43 3127 200 22
mailto:michael.haubenwallner@salomon.at http://www.salomon.at
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]