-
Notifications
You must be signed in to change notification settings - Fork 515
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
async output #344
Conversation
Microsoft.DotNet.Interactive.Jupyter.Tests/ExecuteRequestHandlerTests.cs
Outdated
Show resolved
Hide resolved
|
||
var kernelCommand = new SubmitCode(@" | ||
Console.Write(DateTime.Now); | ||
System.Threading.Thread.Sleep(1000); |
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.
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) |
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.
What is std
?
{ | ||
Subject<string> WriteEvents = new Subject<string>(); |
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.
Please specify private
.
@@ -20,6 +27,39 @@ private class Region | |||
readonly List<Region> _regions = new List<Region>(); |
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.
Ditto.
{ | ||
var formattedValues = new List<FormattedValue> | ||
{ | ||
new FormattedValue( | ||
Formatter.MimeTypeFor(std?.GetType() ?? typeof(object)), std) | ||
Formatter.MimeTypeFor(output?.GetType() ?? typeof(object)), output) |
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.
Or Formatter.MimeTypeFor(typeof(string))
?
No description provided.