mrpmorris / Fluxor

Fluxor is a zero boilerplate Flux/Redux library for Microsoft .NET and Blazor.
MIT License
1.25k stars 144 forks source link

Question | Parallel.ForEachAsync | Dispatcher.Dispatch #264

Closed mozesa closed 2 years ago

mozesa commented 2 years ago

Dear @mrpmorris,

I would like to say thank you for this implementation. I bumped into this library at the weekend, but it seems promising to my application.

Briefly, my app communicates via both ws and http. Ws (SignalR) for local UI, using Vuejs, while http serves as an API. The application itself is a process controller (something resembles to PLC) thus several background workers (operations) run concurrently (using Parallel.ForEachAsync). All in all, I would like to use Fluxor to serve as the single source of truth.

Would it be problematic to call Dispatcher.Dispatch method from operations (presumably running concurrently on different threads)?

Thanks for your help in advance!

Best Regards, András

mrpmorris commented 2 years ago

The library should be thread safe, so let me know if you come across any threading issues and I will fix them.