Is Perforce C ++ P4API thread safe?

The simple question is, is the C ++ API provided by Perforce thread-safe? This is not stated in the documentation.

By "thread-safe" I mean for server requests from the client. Obviously there will be problems if I have several threads trying to set client names, etc. In the same connection.

But if one connection object is specified, is it possible for several threads to receive change lists, receive status, transfer files through a p4 card, etc.?

+3
source share
2 answers

Late answer, but ... From releasing notes yourself:

Known Limitations

      The Perforce client-server protocol is not designed to support
      multiple concurrent queries over the same connection. For this
      reason, multi-threaded applications using the C++ API or the
      derived APIs (P4API.NET, P4Perl, etc.) should ensure that a
      separate connection is used for each thread or that only one
      thread may use a shared connection at a time.

, , , , .

+9

, .

- - . , .

+4

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


All Articles