If that is the case then in the caller thread (i.e. the local object) you might need a callback which can be signalled by the remote object in case it needs any other method. Another way out would be to create a seperate thread to just wait for the calls from the remote executed object - though I am not sure how good an approach this would be.
If you really want to implement the second condition, you might want to look at a CORBAesque oneway function.
Just my thoughts. Feedback welcome.
-- Gangadhar
H�ctor Rivas G�ndara wrote:
Hi,
I'm designing a component to allow remote XPCOM object calls. It will allow:
1.- calling of remotely implemented XPCOM objs. 2.- invocation of local XPCOM objects remotely
In the first case I have no doubt about threading model. The caller thread will marshall the call and send it. After this, the thread will wait for the response, executing incoming call to local objects sent by the remote object. As soon as the response arrives, thread wakes up and the result is returned.
I will use nsIQueueEvent to send incoming calls an response.
I have problems with the second case. If the remote object takes the initative and wants to create a new object or call a mathod in a created one: Which thread should do this work?
_______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
