Skip to content

Commit

Permalink
Merge pull request #504 from lf-lang/keepalive
Browse files Browse the repository at this point in the history
Do not exit if there is no timeout, fast is true, and keepalive is true
  • Loading branch information
edwardalee authored Dec 15, 2024
2 parents 7157d4a + 793fc9a commit 6253d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/threaded/reactor_threaded.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void lf_set_present(lf_port_base_t* port) {
}

bool wait_until(instant_t wait_until_time, lf_cond_t* condition) {
if (!fast) {
if (!fast || (wait_until_time == FOREVER && keepalive_specified)) {
LF_PRINT_DEBUG("-------- Waiting until physical time " PRINTF_TIME, wait_until_time - start_time);
// Check whether we actually need to wait, or if we have already passed the timepoint.
interval_t wait_duration = wait_until_time - lf_time_physical();
Expand Down

0 comments on commit 6253d02

Please sign in to comment.