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

lang: Do not re-reset nowExecutingPath when stopping a routine #2620

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

jamshark70
Copy link
Contributor

Fixes #2540. Also, I've been running with this change for about a month, with no problem.

It might look strange to remove a state reset upon stop, but the line is redundant.

  • The Routine object's oldExecutingPath variable is set only when entering the routine, by next. This is correct: If the routine is sleeping, then there is no oldExecutingPath.

  • oldExecutingPath is, therefore, valid only when the routine is in state tRunning. (Routine states: https://github.com/supercollider/supercollider/blob/master/lang/LangSource/PyrKernel.h#L105 )

  • The branch where I'm removing the line is only for states tSuspended or tInit.

  • So, oldExecutingPath is invalid here, and we shouldn't be putting invalid data into the interpreter's state.

Note also that it's forbidden to stop a routine while the same routine is running: https://github.com/supercollider/supercollider/blob/master/lang/LangPrimSource/PyrPrimitive.cpp#L3368

@nhthn nhthn added the comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" label Jan 5, 2017
@nhthn nhthn added this to the 3.9 milestone Jan 5, 2017
@gusano gusano merged commit 72b1965 into supercollider:master Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants