Search code examples
c++thread-safetyamqpqpid

AMQP Qpid: thread safety


I am looking through docs and somehow I am blind or missing important information, whether C++ classes are thread safe or not. the Session class specifically? Any experiences or anybody who found the info actually? Because it seems to me, that I have to get through sources otherwise...

Thanks!

/ip/


Solution

  • I found the answer in the end. Yes, they are actually thread-safe. In the C++, AMQP Qpid has its own mechanism for processing, it creates a small number of threads(I believe comparable to the number of cores), incorporating thread pool like behavior and thread safety is ensured by processing at any given time on one thread at the time and some locking is ensured for asynchronous operations done by code using given DLL.

    With C++/CLI port it is rather worse, there are locks used in the .Net part and I believe, that some parts of the C++/CLI port are very performant as they could be...