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

Add ability to execute/evaluate workspace in separate thread #36

Open
maciejmatuszak opened this issue Dec 11, 2020 · 2 comments
Open

Comments

@maciejmatuszak
Copy link

  • Add EvaluateAsync methods to Workspace
  • Use CancelationTokenSource as a method to cancel execution
  • check status of cancelation token after each block evaluation
@maciejmatuszak
Copy link
Author

@richorama I was playing with Evaluate method today. I do not understand why there two Evaluate implementations
public virtual object Evaluate(Context context) in Workspace class
static object Evaluate(this Workspace workspace, IDictionary<string,object> arguments = null) and in Extensions

I would just overload the method in Workspace, I think I am missing something?

Maciej

@richorama
Copy link
Owner

Hey @maciejmatuszak I don't think there's any special reason, other that the extension method is for convenience. It could be an overload.

I think you're on the right track. I would suggest that we drop the non-async evaluate, and make everything async (as you don't know what might be further down the program). I'm happy to help out with some of the work here.

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

No branches or pull requests

2 participants