Re: [Cppcms-users] Heavy background processing
Brought to you by:
artyom-beilis
|
From: Petr J. <ele...@ex...> - 2013-05-03 08:18:22
|
Yeah I've seen that. Here is what I'd need to do: Async app sends a handler to threadpool to execute a heavy processing task via threadpool::post. Ok Suppose the heavy processing task wants to print out a status ie. "Task 1 processed, Task 2 processed etc" and want to send it back the the Async app that move the processing to the thread pool so that they can be displayed on a webpage via a long-polling request. Is service::post() used for this? If there was multiple async apps, how to designate the one that should receive these messages? What am I missing? On 3/05/2013 5:55 PM, Artyom Beilis wrote: > > >> ________________________________ >> From: Petr Janda <ele...@ex...> >> To: cpp...@li... >> Sent: Friday, May 3, 2013 6:28 AM >> Subject: Re: [Cppcms-users] Heavy background processing >> >> >> Reading the "thread safety" page, it suggests >> >> "If asynchronous application or any other object that runs in the event >> wants to execute some long running, blocking or heavy operation, it may >> do it by submitting an execution handler to the thread pool." >> >> How is such handler created and submitted to the thread pool? > > http://cppcms.com/cppcms_ref/1.0.0/classcppcms_1_1service.html#a9f52695695783504530983d5d76f44e7 > > http://cppcms.com/cppcms_ref/latest/classcppcms_1_1thread__pool.html > > > > > > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.com/ > CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Please use PGP to encrypt your email to ensure our privacy is respected. |