Hi
> Also, previously, Rob said that the MSRPC and DBUS code was inherently
> different and so different implementations would be needed, but all the
> application logic would be in common code. However, there seems to be
> significant logic that is cut&paste between moonshot-dbus-server.vala
> and moonshot-msrpc-server.vala. The thing that mostly stands out is that
> the loop that figures out whether a service is present in the ID card is
> duplicated between these two functions.
This is the case for now, but I introduced
moonshot-identity-request.vala with the intention that the service
selection code can ultimately go there and be shared between the RPC
servers.
> >> I'm also concerned about the implementation of this interface.
> >> There appears to be a single callback on the main window. What
> >> happens when two different processes call
> >> MoonshotServer.set_identity at the same time?
>
> Javier> This should be fixed later today
>
> It seems fixed for Linux. However for Windows, the RPC thread is left
> blocked while the request is outstanding.
> Does the runtime create new threads for each request? If not, will each
> request be processed serially?
Yes, on Windows the RPC runtime creates a new thread for each call. To
avoid races all the logic is done in the Gtk main loop while the RPC
thread blocks. (The client application does not block during this
process of course). Multiple calls just means multiple RPC threads, but
the requests will execute sequentially because they will be queued by
the Gtk main loop.
Thanks
Sam
|