Re: [Cppcms-users] 100% cpu usage
Brought to you by:
artyom-beilis
|
From: Marcel H. <ke...@co...> - 2013-07-31 22:01:53
|
On 31.07.2013 23:55, Petr Janda wrote: > I had a quick look over your code, and I also don't understand why you > are using async, when all your methods operating synchronously, and block. Until now... I said this is stub only until now. I could split them into sync and async operations and provide two different classes for them. This code is totaly under development and still in early pre-alpha ;) > If you are blocking in an async app, you're blocking the thread pool. > Any heavy operation must be processed in the thread-pool using > thread_pool::post() method. So this means, one thread for all async apps, but multiple workers for the thread pool? How is the async app connected to the thread pool? Why does it block it? That makes no sense to me :/ But yes, I will regard your answers and will revise my code |