From dacb1e7580fa36afe499509732e3c5477a7965cd Mon Sep 17 00:00:00 2001 From: Nate Ridderman <2364408+nateridderman@users.noreply.github.com> Date: Fri, 8 Sep 2023 18:59:50 -0400 Subject: [PATCH] Fix typo in threading.md (#693) --- docs/threading.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/threading.md b/docs/threading.md index b1520b84a..cb170137d 100644 --- a/docs/threading.md +++ b/docs/threading.md @@ -31,7 +31,7 @@ fun setAndRetrieveState() { ``` This would print: [A, C, E, B, D] -You can view some more complex ordering situations [here](https://github.com/airbnb/mavericks/blob/release/2.0.0/mvrx/src/test/kotlin/com/airbnb/mvrx/SetStateWithStateOrderingTest.kt). However, most of the time it will be have as you would expect and you don't have to think about the threading model. +You can view some more complex ordering situations [here](https://github.com/airbnb/mavericks/blob/release/2.0.0/mvrx/src/test/kotlin/com/airbnb/mvrx/SetStateWithStateOrderingTest.kt). However, most of the time it will behave as you would expect and you don't have to think about the threading model. However, it is sometimes necessary to get data synchronously for views so as a convenience, `withState` _is_ run synchronously when called from outside of the ViewModel. ```kotlin @@ -40,4 +40,4 @@ fun invalidate() = withState(viewModel) { state -> } ``` -By default Mavericks creates a shared dispatcher for processing `withState`/`setState` queue. You can set your own dispatcher (e.g. `Dispatchers.Default`) by injecting it into `MavericksViewModelConfigFactory.storeContextOverride` \ No newline at end of file +By default Mavericks creates a shared dispatcher for processing `withState`/`setState` queue. You can set your own dispatcher (e.g. `Dispatchers.Default`) by injecting it into `MavericksViewModelConfigFactory.storeContextOverride`