Hello!

Function, passed to server->post() is called only from within wt event
loop (which means  in particular that wApp points proper application
object) and only if current application is alive. So, you need not to
check that application is alive.

By the way, you can pass another function to server->post() (as third
argument aka fallBackFunction) which will be called if current
application died.

On Mon, Nov 12, 2012 at 3:40 PM, Rob Van Dyck <rob.van.d...@gmail.com> wrote:
> Hi,
>
> Since the post+bind normally happens outside the wt thread, is there a way
> to know the wApp is not yet deleted when you do the binding? For example,
> can you ask the WServer using the sessionid?
>
> Regards,
> Rob.
>
> On Nov 12, 2012 7:26 AM, "Nagaev Boris" <bnag...@gmail.com> wrote:
>>
>> For example, to hide a WText instance through WServer::post():
>>
>> WText* text = new WText(wApp->root());
>> WServer::instance()->post(wApp->sessionId(),
>> wApp->bind(boost::bind(WWidget::hide, text)));
>>
>> On Mon, Nov 12, 2012 at 9:14 AM, Joseph VanAndel <vanan...@ucar.edu>
>> wrote:
>> > Does anyone have an example of using WApplication::bind()?  I searched
>> > all the source code (and examples) in the Wt tree, and googled, but 
>> > couldn't
>> > find an example.
>> >
>> > Thanks much!
>> > On Nov 7, 2012, at 11:09 PM, Nagaev Boris <bnag...@gmail.com> wrote:
>> >
>> >>
>> >> 1. If a function passed to post() is a slot of WObject, it is better
>> >> to wrap it with WApplication::bind(). In this case it will not crash
>> >> in case the WObject is deleted before the function is applied.
>> >>
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Everyone hates slow websites. So do we.
>> > Make your web apps faster with AppDynamics
>> > Download AppDynamics Lite for free today:
>> > http://p.sf.net/sfu/appdyn_d2d_nov
>> > _______________________________________________
>> > witty-interest mailing list
>> > witty-interest@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_nov
>> _______________________________________________
>> witty-interest mailing list
>> witty-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to