Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two consecutive signals cause a handler loop #188

Closed
Enchufa2 opened this Issue Feb 11, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@Enchufa2
Copy link
Member

Enchufa2 commented Feb 11, 2019

Only when the handler is interruptible:

library(simmer)

new_timeout <- trajectory() %>%
  log_("new timeout") %>%
  timeout(1)

customer <- trajectory() %>%
  trap("signal", new_timeout) %>%
  timeout(5) %>%
  log_("out")

blocker <- trajectory() %>%
  send("signal") %>%
  send("signal")

simmer() %>%
  add_generator("customer", customer, at(0)) %>%
  add_generator("blocker", blocker, at(2)) %>%
  run(10)
#> 2: customer0: new timeout
#> 3: customer0: new timeout
#> 4: customer0: new timeout
#> 5: customer0: new timeout
#> 6: customer0: new timeout
#> 7: customer0: new timeout
#> 8: customer0: new timeout
#> 9: customer0: new timeout

@Enchufa2 Enchufa2 added the bug label Feb 11, 2019

@Enchufa2 Enchufa2 closed this in 30ba594 Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.