|
From: Daniel G. <dg...@su...> - 2008-02-13 15:43:39
|
On Wednesday 13 February 2008, Michael Bell wrote: > If I register connect functions for main sink and object sinks then is > there a warranty that the object sinks are called only if the main sink > connect context reports success? I know that the functions all work in > asynchronous mode but I want to know if all connect functions are called > in parallel or the main sink first and then the object sinks (only if > main sink succeeds). AFAIK, no. > > Sometimes it is more time efficient to ask than to dig in the source code Correct. It looks like this: All ObjTypeSinks connect functions get called. If no sink connect function is registered the connect request get immediately return with osync_context_report_success(). This is also done in an async way. After the ObjTypeSink connect function got called, the Main Sink connect function get called ... independent of the result or return of the ObjTypeSink functions. So you have to handle the case that the ObjTypeSink connect function get called even when the MainSink connect fails. And you have to handle inside the ObjTypeSink function that it may take some time until the MainSink connect function established the connection. ... the only think which is guaranteed is the sequence of the async function calls. That first all ObjTypeSink connect function get called and then MainSink connect function (this is the case for all sink function .. not only connect). Hope this helps. best regards, Daniel |