Re: simple way to register timeout functions in ORBit's-mainloop?



Hi Michael,

Michael Meeks wrote:
> Hi Michael,
> 
> On Mon, 2003-06-02 at 13:27, Michael Haubenwallner wrote:
> 
>>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.
> 
> 
> 	Hmm; ok - so with ORBit2 not exposing link now; I guess the only way
> you can do this is with a thread; however it's not entirely clear to me
> how you can cancel a hung outgoing call [ assuming that's your problem ]
> ?

Another try to explain the situation:

My problem is not a hung outgoing-call.

The client calls different servants again and again within one
transaction, and i have to time out this transaction while no servant
call is active, to avoid an open transaction if the client dies before
closing it using another servant.

I already _have_ installed a timeout function, but with the overhead of
using g_timeout_source_new/g_source_set_callback/linc_main_get_loop/
g_main_loop_get_context/g_source_attach/g_source_unref, as found in
g_timeout_add_full, and it works well.
Just this overhead is what i want to avoid when i say "simple way".

And when i read some last messages about hiding the linc-stuff behind
ORBit, i assume i will run into problem using linc_main_get_loop with
newer releases of ORBit2.

So i would need sth. like ORBit_timeout_add() (the "simple way") or at
least GContext* ORBit_get_context() or GMainLoop* ORBit_get_main_loop()
instead of linc_get_main_loop() for the "current way".

If you intend to hide the glib-stuff too, the "simple way"
(sth. like ORBit_timeout_add) would be required.

Regards,
   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]