You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #492 states that the client is not thread safe.
Just few days later, you have implemented commit e022b8b which wraps ClientImpl::send() with two (!) mutex guards - request_mutex_ and socket_mutex_. Can we consider now that the thread safety has been provided?
I really want to send now requests to my server in asynchronous way. My alternative is to create a second client object for the second sending thread.
Thanks a lot!
The text was updated successfully, but these errors were encountered:
@miketsts, since ClientImpl::send() is now protected with request_mutext_, yes, it can be considered as thread safe. But the down side is that the second send() call will be blocked until the first call exits from std::lock_guard<std::recursive_mutex> request_mutex_guard(request_mutex_)... But it's guaranteed that the second request will reuse the same socket if the keep-alive condition is still met. If 'simultaneous' or concurrent requests are necessary, we still have to make another client objects. Hope this explanation helps!
Hi, @yhirose
Issue #492 states that the client is not thread safe.
Just few days later, you have implemented commit e022b8b which wraps
ClientImpl::send()
with two (!) mutex guards -request_mutex_
andsocket_mutex_
. Can we consider now that the thread safety has been provided?I really want to send now requests to my server in asynchronous way. My alternative is to create a second client object for the second sending thread.
Thanks a lot!
The text was updated successfully, but these errors were encountered: