Boost logo

Boost :

Subject: Re: [boost] [msm] Event deferring causes stack overflow
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2010-11-10 17:02:24


<snip>
>It is not that nice for 2 reasons:
>
>1. It makes state machine behavior description more splinted in our case to several files ( not a big deal).
>2. I have created our own defer functor which logs the event deferral with our logging framework
>is there a way do similar function in a state like the no_transition for deferred events where I can implement some generic logging ?.

Hi Richard,

No, it's not nice. Luckily, last night brought fresh ideas and I
implemented a fix. It has to run all regression tests to be 100% sure
but it looks good so you can give it a try.
For your logging functor, you have to provide a typedef inside the
functor definition (like Defer is now doing in functor_row.hpp):

typedef int deferring_action;

This activates the normal deferred handling and the stack overflow is gone.

The fix can be downloaded from the trunk (revision 66490).
Unfortunately, it is too late to make it into the 1.45 so be careful
if you switch to the new boost release :(
I also didn't have time to actualize the doc yet.

HTH,
Christophe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk