-
Notifications
You must be signed in to change notification settings - Fork 603
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
SoE on pure stream with recursion #1035
Comments
Can you try commenting out the special case in flatMap for emitting a singleton stream? Removing the special case will reintroduce a memory leak but it will at least confirm your hunch. |
@mpilquist I have tried that just now, and as I have suspected this is unrelated. That means we do have SoE whether the special case for single element streams is there or not. |
As I was tracing this down I thin the problem is definition of ViewL, which in fact escapes the tail position in streams that jump between uncons and runFoldScope. |
@pchlupacek Yeah I agree the issue is the non-tail position recursive call in |
@mpilquist I may be on the track to resolve this. I have introduced The tests are not yet all passing, but I think the issues there are fixable. I would appreciate your feedback. Thanks |
Looks good - let me know how it goes
… On Dec 30, 2017, at 12:20 AM, Pavel Chlupacek ***@***.***> wrote:
@mpilquist I may be on the track to resolve this. I have introduced Algebra.Uncons, and modified runXXX that seems to work nicely and no more SoE. The approach is in interrupt branch, and changes to Algebra are here. https://github.com/functional-streams-for-scala/fs2/pull/1019/files#diff-91195044dae5827508d46a79e123c46aR19
The tests are not yet all passing, but I think the issues there are fixable.
I would appreciate your feedback. Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This produces SoE:
My gut it is related to special case of implementation in flatMap + this counters stack safety of FreeC through two consecutive viewL's in
runFoldScope
anduncons
.@mpilquist, @SystemFw this was discovered when implementing interruption, and I was not able to fix it in terms of current algebra and runFoldScope//uncons implementation.
The text was updated successfully, but these errors were encountered: