c++ - In ONC RPC, is it valid to call svc_run() from two threads, registered with different program no? -
In our project, which supports multipolate (Linux, Solaris, and Windows) and is coded in C and C ++ , We created a multilayer application that created a ONC RPC for IPC
A recently built an application to work on two different programs There is a need for the server.
I have tried the following to test. In the first thread,
I am in the first thread) Creating a TCP transport. B) Registering the transport c) Calling svc_run 'i' in another thread, make a second TCP transport. ) Transport registration with a separate program C) Calling svc_run *
I have tried this on 4, and this is working fine for me.
But is it valid for registering two programs and valid for calling svc_run in two different threads?
I tried to search the internet, but I did not get any clear information on this.
It seems logical that this is possible, although I have never tried it myself
Please switch left of -M
com rpcgen
IDL compiler (this is the page on its man
Solarus): < / P>
- Multithread-safe stubs to pass-in logs and results between RPC generation-generated code and user written code. This option is useful for users who want to use threads in their code.
If the proxy / stub code is thread-protected, and you register two event loops with two different RPC process numbers - I guess that should behave like this You actually had 2 different processes (RPC-wise).
Comments
Post a Comment