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

Kill a simulation? #72

Closed
AndreaCrotti opened this issue Aug 13, 2021 · 2 comments
Closed

Kill a simulation? #72

AndreaCrotti opened this issue Aug 13, 2021 · 2 comments

Comments

@AndreaCrotti
Copy link
Contributor

If I run a long (and possibly buggy) simulation from the repl, I can't really kill it without restarting the repl entirely.

I think ideally sending a cider-interrupt or equivalent should kill the whole thing, which I guess doesn't work out of the box because it's using heavily core.async under the hood right?

@mhjort
Copy link
Owner

mhjort commented Aug 28, 2021

You are right. There are few go loops that keep running if you interrupt the function call in repl. This is discussed more here: https://stackoverflow.com/questions/20485188/gracefully-exit-a-clojure-core-async-go-loop-on-kill

I have used the exit channel mechanism (a.k.a. poison pill) in other projects using core.async. This kind of feature could be added to clj-gatling too. For example there could be a function kill-all-running-simulations which would send message to all exit channels.

@mhjort
Copy link
Owner

mhjort commented May 5, 2022

Implemented in 0.17.3

@mhjort mhjort closed this as completed May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants