In ONC RPC, is it permissible to call svc_run () from two threads registered with another program?

In our project, which supports multi-platform (Linux, Solaris and Windows) and is encoded in C and C ++, we use ONC RPC for IPC. Recently, there has been a requirement that the application server run on two different programs.

I tried the following testing.

A multi-threaded application is created. Inside two created workflows.

    In first thread I’m
         a) Creating a TCP transport
         b) Registering the transport
         c) Calling svc_run

    In second thread I’
         a) Creating a second TCP transport
         b) Registering the transport with a different program no
         c) Calling svc_run*

I tried this on Red Hat Linux 4 and it works great for me.

But is it permissible to register two no programs and call svc_run in two different threads?

I tried to search the Internet, but I could not find any clear information about this.

+3
1

, , .

-M rpcgen IDL ( man Solaris):

 -M          Generates multithread-safe stubs for passing
             arguments   and   results   between  rpcgen-
             generated code and user written  code.  This
             option  is useful  for users who want to use
             threads in their code.

/ , RPC- - , , (RPC-).

+2

Source: https://habr.com/ru/post/1713467/


All Articles