We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d454505 commit cb0078aCopy full SHA for cb0078a
core/reactor_common.c
@@ -549,6 +549,14 @@ void _lf_initialize_timers(environment_t* env) {
549
_lf_initialize_timer(env, env->timer_triggers[i]);
550
}
551
552
+
553
+ // Create an extra event and put it on the recycle queue.
554
+ // An LF program with n timers require n+1 events and the last event
555
+ // needs to be initialized to the event recycle queue.
556
+ if (env->timer_triggers_size > 0) {
557
+ event_t *e = _lf_get_new_event(env);
558
+ _lf_recycle_event(env, e);
559
+ }
560
561
562
/**
0 commit comments