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

calling plotting functions inside a reactor makes program unstoppable #1089

Open
shriram opened this issue Jul 19, 2017 · 4 comments
Open

calling plotting functions inside a reactor makes program unstoppable #1089

shriram opened this issue Jul 19, 2017 · 4 comments
Assignees

Comments

@shriram
Copy link
Member

shriram commented Jul 19, 2017

If there's a big-bang window, and there's a plot being popped up by each iteration through the loop, there's no way to get to the Stop button to halt the computation.

@sorawee sorawee self-assigned this Jul 19, 2017
@jpolitz
Copy link
Member

jpolitz commented Jul 20, 2017

Ditto calling reactors from within a plot of function-plot, which can cause other issues as well.

@jpolitz
Copy link
Member

jpolitz commented Jul 20, 2017

include plot-list
include image

fun wtf(x):
  reactor: init: x, on-tick: _ + 1, stop-when: _ > num-random(10), close-when-stop: true end.interact()
end

wtfp = function-plot(wtf)
draw-plot("WTF", wtfp)

@jpolitz
Copy link
Member

jpolitz commented Jul 20, 2017

I think we need more of a notion of a custodian here, because there isn't really a hook-up direction that lets the runtime tell the reactor to quit, just an interface that tells the reactor to quit and the runtime to continue.

@sorawee
Copy link
Contributor

sorawee commented Dec 7, 2017

The issue that Joe raised is not about the chart/plot library specifically though. This would trigger the problem too:

fun wtf(x):
  reactor: init: x, on-tick: _ + 1, stop-when: _ > num-random(10), close-when-stop: true end.interact()
end

for each(i from range(1, 1000)) block:
  wtf(0)
  nothing
end

I have a version of the chart library that doesn't have the modal dialog. The problem is that when the chart library is called inside a reactor, the reactor would prevent the chart dialog to be seen. Maybe there's a way to fix, but even so, the original issue won't be solved: the stop button will still be hidden by big bang's modal dialog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants