Re: [Cppcms-users] mapping across mount_points
Brought to you by:
artyom-beilis
|
From: Marcel H. <ke...@co...> - 2013-07-15 10:36:33
|
On 15.07.2013 12:26, Artyom Beilis wrote:
> Unfortunately not.
>
> Technically asynchronous applications can be unmounted during their life time so mapping can be invalid.
> or new applications can be mounted.
I know, a very usefull technique btw..
> What you can do it to do something like that.
>
> class dummy_async_mapping : public cppcms::application {
> dummy_async_mapping(...)
> {
> // all mapping (not dispatching) goes there
> }
> }
>
> class async_app : public dummy_async_mapping ...
>
> class sync_app : public cppcms::application {
> sync_app(...)
> {
> attach("/webapi/" , new dummy_async_mapping()
> ...
> }
> }
>
> Such that they both would get the mapping you need.
So, this will work? When I attach an async app in a sync context? The
last time I tried it like Petr suggested, it was mounted as sync.
>
>
> Artyom Beilis
> --------------
> CppCMS - C++ Web Framework: http://cppcms.com/
> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>
|