-
Notifications
You must be signed in to change notification settings - Fork 604
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
Feature/interrupt with algebra #1059
Conversation
…/fs2 into feature/interrupt-with-algebra
FWIW I think the travis failure is unrelated |
I think some instability in the |
@SystemFw I think the issue is that delays is mutable unguarded ListBuffer. I think that spec needs to be made stronger, as the delays are accesses potentially from multiple threads. |
@@ -2793,7 +2771,7 @@ object Stream { | |||
val runStep = | |||
Algebra | |||
.compileScope( | |||
scope, | |||
scope.asInstanceOf[fs2.internal.CompileScope[F, UO]], // todo: resolve cast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the TODO be resolved by specifying UO as type param to getScope (instead of Nothing)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunatelly the result of unconsAsync
is Pull[F, Nothing, AsyncPull[F, Option[(Segment[O, Unit], Stream[F, O])]]]
so I would need then typecase UO back to Nothing, at least that's what compiler is asking me to do.
I have plan to address in #1056.
@mpilquist @SystemFw pls let me know when you will be done reviewing this. I have ready |
I'm in airports all day today, so it's more likely going to be tomorrow.
However, feel free to go ahead with only Michael's approval, I'm still
catching up on the core interpreter stuff
…On 7 Jan 2018 17:20, "Pavel Chlupacek" ***@***.***> wrote:
@mpilquist <https://github.com/mpilquist> @SystemFw
<https://github.com/systemfw> pls let me know when you will be done
reviewing this. I have ready merge pull request that uses new
interruption, and can just make PR once this is merged.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1059 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHaN7rj5zGU-iiUhstc3bi03pEbrHOXzks5tIPzRgaJpZM4RVX30>
.
|
@mpilquist @SystemFw there is the interrupt implemented with Algebra.
The idea is pretty simple, I had it on mind couple of weeks, but always failed to implement up to until now :-). Essentially the idea is that scope that is first to be interrupted is caching it`s next step in case of interruption and using that step when the interruption occurs.
Also as part of this -
O
++
,repeat
,flatMap
reverted to M10 implementationsThe implementation is bit noisy (if you can find a way how to make it cleaner I will really appreciate). Going forward I am thinking of introducing new type
Compile[F, O]
that will Contain current Scope[F, O] to cleanup algebra and also allow different compilation implementations to be plugged in (i.e. debugging compiler, javascript-optimized compiler etc..)