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

async output #344

Merged
merged 5 commits into from
Jul 25, 2019
Merged

async output #344

merged 5 commits into from
Jul 25, 2019

Conversation

rchande
Copy link

@rchande rchande commented Jul 24, 2019

No description provided.


var kernelCommand = new SubmitCode(@"
Console.Write(DateTime.Now);
System.Threading.Thread.Sleep(1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Using a custom scheduler, we wouldn't need an actual Thread.Sleep and the test can run faster.

@@ -210,6 +191,22 @@ private void SetupScriptOptions()
}
}

private void PublishOutput(string std, KernelInvocationContext context, IKernelCommand command)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is std?

{
Subject<string> WriteEvents = new Subject<string>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please specify private.

@@ -20,6 +27,39 @@ private class Region
readonly List<Region> _regions = new List<Region>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

{
var formattedValues = new List<FormattedValue>
{
new FormattedValue(
Formatter.MimeTypeFor(std?.GetType() ?? typeof(object)), std)
Formatter.MimeTypeFor(output?.GetType() ?? typeof(object)), output)
Copy link
Contributor

Choose a reason for hiding this comment

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

Or Formatter.MimeTypeFor(typeof(string))?

@rchande rchande changed the title wip: async output async output Jul 24, 2019
@colombod colombod merged commit 013f178 into dotnet:master Jul 25, 2019
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.

None yet

3 participants