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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. I believe we can avoid the apply/resume stack growth easily enough. I started working on a patch but haven't quite got it working yet. Just letting you know this is still on my radar...
Previously, as sequence of state transitions that did not pass through
an asynchrous boundary incurred stack frames. The trivial loop in
the enclosed test case would then overflow the stack.
This commit merges the `resume` and `apply(tr: Try[Any])` methods into
a `apply`. It changes the body of this method to be an infinite loop
with returns at the terminal points in the state machine (or at a
terminal failure.)
To allow merging of these previously separate matches, states that
contain an await are now allocated two state ids: one for the setup
code that calls `onComplete`, and one for the code in the continuation
that records the result and advances the state machine.
Fixesscala#93
This code causes a stack overflow:
The generated
resume
method takes up a stack frame for each iteration of the loop.Tested with 0.9.2 for scala 2.10. Has this been fixed in the master branch? I don't have time to check at the moment.
The text was updated successfully, but these errors were encountered: