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

enforce same thread on getState() #34

Merged
merged 11 commits into from
Dec 16, 2019
Merged

Conversation

patjackson52
Copy link
Contributor

@patjackson52 patjackson52 commented Dec 6, 2019

issue #12

  • Introduces a same thread check on all the functions on the store. This will through an exception if a store function is called from a thread other than the one it was created on.
  • updated docs with section on Threading

I was unable to implement win, linux, and wasm. Being I don't know of anyone using kotlinredux on those platforms I don't consider it a blocker. Library will work, but does not have same thread enforcement.

Before this PR, if accessed from another thread it may through the exception from the isDispatching check if dispatching was happing on another thread. This new exception will be more informative.

@patjackson52 patjackson52 force-pushed the feature/thread-enforce branch from 0682134 to 442414f Compare December 6, 2019 22:19
@patjackson52 patjackson52 marked this pull request as ready for review December 7, 2019 21:39
@patjackson52 patjackson52 changed the title [WIP] enforce same thread on getState() enforce same thread on getState() Dec 9, 2019
@patjackson52 patjackson52 force-pushed the feature/thread-enforce branch from 14671cd to 5bd8adc Compare December 16, 2019 13:56
@patjackson52 patjackson52 merged commit 328f537 into master Dec 16, 2019
@patjackson52 patjackson52 deleted the feature/thread-enforce branch April 5, 2020 20:39
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.

1 participant