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

Eliminate deadlock when executing an action from IDispatcher.ActionDispatched on a different thread #474 #477

Merged
merged 7 commits into from
Mar 6, 2024

Conversation

mrpmorris
Copy link
Owner

No description provided.

@mrpmorris mrpmorris added this to the 6.0 milestone Mar 6, 2024
@mrpmorris mrpmorris changed the base branch from master to release/6.0 March 6, 2024 09:12
@mrpmorris mrpmorris merged commit 032e39c into release/6.0 Mar 6, 2024
@mrpmorris mrpmorris deleted the 474/PeteM-DeadLock branch March 6, 2024 09:13
dmitry-pavlov added a commit to dmitry-pavlov/Fluxor that referenced this pull request Mar 22, 2024
* Remove support for obsolete versions of .NET (mrpmorris#385)

* Change IDisposable to IAsyncDisposable (Fixes mrpmorris#324)

* ReduxDevTools should not call UseRouting (Fixes mrpmorris#360) (mrpmorris#388)

* Remove UseRouting from UseReduceDevTools

* Allow action filtering on redux dev tools (fixes mrpmorris#383) (mrpmorris#389)

* Support action filtering in Redux Dev Tools

* Add unit tests

* Remove Newtonsoft.Json (Fixes mrpmorris#386) (mrpmorris#392)

* Remove dependency on Newtonsoft.Json

* Remove support for obsolete versions of .NET (mrpmorris#385)

* Change IDisposable to IAsyncDisposable (Fixes mrpmorris#324)

* ReduxDevTools should not call UseRouting (Fixes mrpmorris#360) (mrpmorris#388)

* Remove UseRouting from UseReduceDevTools

* Allow action filtering on redux dev tools (fixes mrpmorris#383) (mrpmorris#389)

* Support action filtering in Redux Dev Tools

* Add unit tests

* Remove Newtonsoft.Json (Fixes mrpmorris#386) (mrpmorris#392)

* Remove dependency on Newtonsoft.Json

* Allow action filtering on redux dev tools (fixes mrpmorris#383) (mrpmorris#389)

* Support action filtering in Redux Dev Tools

* Add unit tests

* Bump Swashbuckle.AspNetCore.SwaggerUI

Bumps [Swashbuckle.AspNetCore.SwaggerUI](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)
- [Commits](domaindrivendev/Swashbuckle.AspNetCore@v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: Swashbuckle.AspNetCore.SwaggerUI
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deadlock mrpmorris#474 (mrpmorris#476)

* Add lock conflict test
* Alternate locking approach
* Update .net versions

* Eliminate deadlock when executing an action from IDispatcher.ActionDispatched on a different thread mrpmorris#474 (mrpmorris#477)

* Update SourceLink
* Fix flaky tests in ThrottledInvoker
* Execute feature callbacks outside lock()

* Have ThrottledInvoker re-enter if the timer executes too soon.

* Have test ensure the execution window is within (ThrottleWindowMs) and (ThrottleWindowMs* 2)

* Change parameter name from action to throttledAction in test.

* Don't test for too long, only too short.

* Task.Yield to ensure fire-and-forget action logging has time to complete

* Update throttling tests

* Update throttling test comments

* Rewrite ThrottledInvoker to not use Timers

* Source formatting

* Make throttled invoker disposable

* Call ThrottledInvoker.Dispose  from Blazor libraries

* ThrottledInvoke.Dispose tests

* Change style of unit test

* Remove race condition from test

* Change test timings

* Spelling error

* Use IAsyncLifetime instead of using Task.Wait()

* Code tidy

* Remove NCrunch file

* Ignore *ncrunch*

* Use TimeSpan instead of int MS

* 6.0-Beta1

* Fix errors in tests detected by NCrunch.

* Unit tests for navigation fragments

* Rename UrlComparer.SameAs to UrlComparer.AreEqual

* Delete TestNavigationManager

* Add a note to Releases.md about mrpmorris#455

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Peter Morris <mrpmorris@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@gnalvesteffer
Copy link

gnalvesteffer commented Jul 16, 2024

Thank you for this fix. I was on an old version of Fluxor from last year and just ran into this deadlock in my application and noticed that two threads were dispatching an action at the same time and the main thread was waiting on a lock to free. Figured I'd update my Fluxor reference and noticed that the deadlock went away. so I tracked down this PR to see if a deadlock happened to have been found and fixed. Good to see.

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

Successfully merging this pull request may close these issues.

None yet

2 participants