First pass at thread enforcement. This throws an exception when 'getState' is accessed from a thread other than the one the store was created on. The sample app now throws the exception when tapping the first button. This is only here for the draft PR.
TODO
add all targets: linux, mac, windows, wasm, etc
add unit tests - if possible add platform specific tests source sets in the lib module
do thread enforcement on dispatch as well.
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.
First pass at thread enforcement. This throws an exception when 'getState' is accessed from a thread other than the one the store was created on. The sample app now throws the exception when tapping the first button. This is only here for the draft PR. TODO
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.@AOrobator thoughts?