SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 215 forks source link

Threadingbugsolution #91

Open jspuij opened 4 years ago

jspuij commented 4 years ago

In addition to #88 I found another issue. The fact that the dispatcher was implemented as NullDispatcher (probably OK for single threaded Client Side Blazor), made it possible that user JSInterop calls from javascript would trigger concurrent renders on different threads.

I have implemented a proper dispatcher for the Synchronization context to schedule async calls on the render thread.

This pull request includes the code from the previous one. So merging this will probably suffice.