Re: [Cppcms-users] Synchronous app calls io_service.post() and blocks itself
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2014-03-19 11:01:58
|
> I have two questions if I opt for this approach: > > (1) Can I simply use > cppcms::thread_pool &thread_pool() > in the central service or must I create my own instance of > cppcms::thread_pool? Yes you can use thread pool of the central service - it is designed for such job. > (2) Synchronous applications require below technique you > mentioned > earlier, or std::future or the likes, to get the results > "posted" back > by the jobs running in thread pool. Correct? > > **begin technique** > ... > **end technique** Basically it is a way to wait for something to happen in the current thread... Artyom |