This issue tracks discussion about architectural decisions about asynchronous operations and multi-threading.
Current status
This discussion was initiated by identification of following points during PR #27:
- Methods
WaitForNextRender and DispatchAndAssertNoSynchronousErrors are blocking and not returning a Task object.
- Test code run in 2 threads. Test code starts in thread managed by test framework. Then every operation (e.g. rendering, mocked JS events) runs in Razor Dispatcher thread.
Open question 1
Shall in general waiting operations like WaitForNextRender and DispatchAndAssertNoSynchronousErrors be blocking? Or should they return Task object that can be awaited?
Open question 2
Should whole test run in synchronization context of Razor Dispatcher? Or is it desired to run tests in 2 synchronization contexts?
This issue tracks discussion about architectural decisions about asynchronous operations and multi-threading.
Current status
This discussion was initiated by identification of following points during PR #27:
WaitForNextRenderandDispatchAndAssertNoSynchronousErrorsare blocking and not returning aTaskobject.Open question 1
Shall in general waiting operations like
WaitForNextRenderandDispatchAndAssertNoSynchronousErrorsbe blocking? Or should they return Task object that can be awaited?Open question 2
Should whole test run in synchronization context of Razor Dispatcher? Or is it desired to run tests in 2 synchronization contexts?