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

[WIP] Streams 2.4.18 update #2726

Closed
wants to merge 2 commits into from
Closed

Conversation

Arkatufus
Copy link
Contributor

@marcpiechura
Copy link
Contributor

part of #2601

{
this.AssertAllStagesStopped(() => {
TargetFile(f => {
var completion = Source.From(_testByteStrings);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be .From(new []{ _testByteStrings.Head())

b => Task.FromResult(FileIO.ToFile(f)),
() => Task.FromResult(new IOResult(0, new Result<NotUsed>(NotUsed.Instance)))
), _materializer);
completion.MapMaterializedValue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be completion.MapMaterializedValue(list => list.SelectMany(x => x)); not sure about the actual type of list but flatMap means SelectMany

), _materializer);
completion.MapMaterializedValue();

});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task needs to be awaited + CheckFileContent

onPush: () => { },
onUpstreamFinish: () =>
{
SetKeepGoing(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this into GotCompletionEvent

@@ -984,7 +994,7 @@ private sealed class SubSource : SubSourceOutlet<TIn>
{
private readonly Logic _logic;
private readonly LazySink<TIn, TMat> _stage;
private bool _completed;
internal bool Completed;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move Completed into the Logic class

@@ -984,7 +994,7 @@ private sealed class SubSource : SubSourceOutlet<TIn>
{
private readonly Logic _logic;
private readonly LazySink<TIn, TMat> _stage;
private bool _completed;
internal bool Completed;

public SubSource(Logic logic, TIn firstElement) : base(logic, "LazySink")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you get the Logic as parameter and can use _logic.Completed in the two places below.

@@ -1005,7 +1015,7 @@ public SubSource(Logic logic, TIn firstElement) : base(logic, "LazySink")
onUpstreamFinish: () =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with _logic.GotCompletionEvent()

@Arkatufus
Copy link
Contributor Author

Partially resolved, moving to a new branch.

@Arkatufus Arkatufus closed this Jun 6, 2017
@Arkatufus Arkatufus deleted the #22033 branch June 6, 2017 21:22
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

Successfully merging this pull request may close these issues.

2 participants