script timeout interrupt

Jarred Holman jarred.holman at
Wed Jun 22 20:27:34 PDT 2011

How do I use script timeout interrupts without having a race condition?

I'm currently using it like this:

int timerId = startTimer();
TRY(player, kCatchAction_ReportAsError)
CATCH(Exception *exception)
    //handle exception

It seems like there will be a problem if the timer fires after the
script returns (or exception is caught) and before the cancelTimer
function is called. The only solution I can think of is to set
core->interrupted back to NotInterrupted after the timer is cancelled,
but it's a private member.

Has anyone else found a better way?


More information about the Tamarin-devel mailing list