Closed RockNHawk closed 4 years ago
@RockNHawk Thank you for this very explicit presentation of the bug, I never thought you'd have concurrent issue using the library. I reused your test in some way and so I managed to prevent concurrent dispatch pretty easily.
The v3.5.1 of ReduxSimple is now available. Tell me what you think!
@RockNHawk Thank you for this very explicit presentation of the bug, I never thought you'd have concurrent issue using the library. I reused your test in some way and so I managed to prevent concurrent dispatch pretty easily.
The v3.5.1 of ReduxSimple is now available. Tell me what you think!
Than you for your respond, my application is a little special and calls Store.Dispatch
in parallel, so I need to lock it to make it work properly. I wonder if the new version directly prevents concurrent calls?
In fact, there is a demand for concurrent calls. If the new version can provide a switch for concurrent detection, I can use the new version.
No lock is necessary on your side. As from v3.5.1, you can concurrently dispatch actions and everything will be handled in the library. If you have any problem, feel free to report the bug to me. :)
I have tested store.Dispatch is not thread safe, must add a lock, here is the passed unit test with concurrent :