Closed kwikrick closed 7 years ago
You will get better performance by creating one client, and then calling it repeatedly from the main thread, until you are done (or one client per core you want to use, and then distribute the work among the clients). But this definitely looks like a bug that needs to be fixed.
I'll try to reproduce it.
Thanks for reporting the problem.
Hi Jarle,
I'm getting access violations in ConnectionPoolImpl::OnCacheCleanup. These occur seemingly randomly (i.e. at random points while repeatedly running tests). See track trace below.
I'm running a Windows build, latest commit from 2017-05-19 (SHA 5e7ed3e6c35453fbb2598cf969723b63e28a961d).
It seems that the ConnectionPoolImpl instance has been deleted, but the OnCacheCleanup callback is still invoked by the timer. My app makes repeated calls using RestClient::Create()->ProcessWithPromiseT<>(...), so creating a new client and connection pool for each call repeatedly (right?).
Aside from that, I love the restc-cpp lib. Thank you for creating this!
Rick
Stack trace: