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 pipeline blocks the thread #78

Open
valentiniliescu opened this issue Jul 21, 2020 · 1 comment
Open

Async pipeline blocks the thread #78

valentiniliescu opened this issue Jul 21, 2020 · 1 comment

Comments

@valentiniliescu
Copy link
Contributor

One of the advantages of async code is it does not block threads. For example, in a UI application, writing async code will allow the UI thread not to be blocked by long operations. However, in the current implementation, an async pipeline will block the current thread.
See https://github.com/valentiniliescu/TestPipelinesAsync for an WinForms example. There are 3 buttons:

  • one that does a synchronous long operation
  • one that does a asynchronous long operation
  • one that does a long operation in an async pipeline

You can check that the async pipeline behaves more like the synchronous click - the UI thread hangs till the operation finishes (try to click on the text boxes, the UI is frozen).

@valentiniliescu
Copy link
Contributor Author

One possible solution would be to have an async collector result. The downside is the refactoring to async would not be as seamless. Also, not sure if the implementation would be feasible.

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

1 participant