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

Deadlocks still occur #426

Closed
mfmadsen opened this issue May 24, 2023 · 3 comments
Closed

Deadlocks still occur #426

mfmadsen opened this issue May 24, 2023 · 3 comments

Comments

@mfmadsen
Copy link
Contributor

Unfortunately there is still a deadlock issue in 5.8 if actions are dispatched on other threads while store activation is in progress. I'm currently working on a fix for this and will submit a PR when ready.

@mfmadsen
Copy link
Contributor Author

mfmadsen commented May 24, 2023

@mrpmorris, I have made the change you can see here master...mfmadsen:Fluxor:fix-deadlockDuringStoreInitialize.
I have added a unit test that reproduces the issue and then a small change in the Store to fix the issue. The change does mean that effects are processes as part of the dispatching pipeline one action after another. I do not believe this should cause any issues, but maybe you have some insights on why the effects previously was processed outside of the dispatcher queue processing?

@mfmadsen
Copy link
Contributor Author

I have created PR #427

@mrpmorris
Copy link
Owner

Thanks very much for this, the test case was extremely useful.

Could you please alter the Store.cs changes to match the ones in this PR, and also update the releases.md file accordingly?
https://github.com/mrpmorris/Fluxor/pull/430/files

Thank you!

I'd have just merged my own PR, but it seems to have eradicated acknowledgement of your contribution, and I didn't want that.

mrpmorris pushed a commit that referenced this issue Jun 4, 2023
…n action (#427)

* Adds unit test that reproduces issue deadlock
* Trigger effect one action after another and inside IsDispatching/dequeuing loop
* Fixes #426 


---------

Co-authored-by: Morten Fischer-Madsen <[email protected]>
@mrpmorris mrpmorris mentioned this issue Jun 4, 2023
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

2 participants