reduxkotlin / redux-kotlin

Redux implementation for Kotlin (supports multiplatform JVM, native, JS, WASM)
https://reduxkotlin.org
MIT License
426 stars 32 forks source link

enforce same thread on getState() #34

Closed patjackson52 closed 4 years ago

patjackson52 commented 4 years ago

issue #12

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.