cppcms
cppcms copied to clipboard
applications_pool_size
Hello.
- Can't find applications_pool_size within sources any more. What is the way to manage sync applications pool size (and thread pool size)?
- In my typical case I process a request by async app and find out that long-running job is needed, so I want to pass the job (partially done) to different thread to continue processing. Now we have submit_to_asynchronous_application and submit_to_pool now. Whether the only way to link these two parts of code is to pass a key via url (to search for the job in some custom storage)? I suspect that thread_pool could be useful in job-centralized processing, but it's hard to get the way it works in conjunction with applications. As a result: custom queues and custom adjustable thread pools. Please, direct me how to use cppcms natively for such a task.
Can't find applications_pool_size within sources any more
See: http://cppcms.com/wikipp/en/page/cppcms_1_2_pool_api
The synchronous applications number will not exceed the thread pool size. There was a design issue in CppCMS 1.0 that was fixed in 1.2
I suspect that thread_pool could be useful in job-centralized processing
Yes you can always submit a job to cppcms thread pool directly.
Whether the only way to link these two parts of code is to pass a key via url (to search for the job in some custom storage)
You can associate an arbitrary data to http::context when you pass it to another application/pool using Context specific data API: reset_specific, get_specific and release_specific member functions of the context:
Why it would be useful to instantiate an asynchronous application on first access only? Usually it is a basis of some complex functionality being processed within it's event loop. I've switched to new initialization methods and had to use prepopulated flag to let it work as expected.