We've been seeing some strange crashes that looked like memory corruption.
After some hunting around we think we've narrowed it down to using the class instance of httplib::Client from multiple threads in parallel.
Technically the client does have a request mutex, but that has two limitations:
Changing headers is not protected by the request mutex, we think this is leading to the memory corruption.
Only one request may be in-flight at a time with a single client, this is probably adding significant latency in some cases
The downside of this is that we establish a new connection for basically every request, but I think the latency that can add is minimal compared to the above downsides.
Verified the GlimeshServiceConnection still works using my homelab setup.
We've been seeing some strange crashes that looked like memory corruption.
After some hunting around we think we've narrowed it down to using the class instance of
httplib::Client
from multiple threads in parallel.Technically the client does have a request mutex, but that has two limitations:
The downside of this is that we establish a new connection for basically every request, but I think the latency that can add is minimal compared to the above downsides.
Verified the GlimeshServiceConnection still works using my homelab setup.