cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Threadpool Refactor

Open COM8 opened this issue 11 months ago • 4 comments

Refactors cpr::ThreadPool to get rid of all those deadlocks and overly complex code making it at least a bit simpler.

Fixes:

  • https://github.com/libcpr/cpr/issues/1040
  • https://github.com/libcpr/cpr/issues/988

Docs:

  • https://github.com/libcpr/docs/pull/54

COM8 avatar Jan 26 '25 17:01 COM8

Hi, I would like to suggest use a third thread pool implementation: https://github.com/bshoshany/thread-pool

portsip avatar Mar 08 '25 10:03 portsip

Hi, I would like to suggest use a third thread pool implementation: https://github.com/bshoshany/thread-pool

Agree. If I'm unable to fix the macos socket issues, I will most likely switch and experiment with that one. Good point.

COM8 avatar Mar 20 '25 14:03 COM8

The ASIO thread pool is also a good choice.

portsip avatar Mar 20 '25 14:03 portsip

The ASIO thread pool is also a good choice.

Yes! With ASIO threadpool we could get an awaitable Get/Post and use that within a boost coroutine. That would be nice to have.

roemil avatar Jul 22 '25 17:07 roemil