-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Krzysztof Borowy
authored
Jul 24, 2019
1 parent
eb4112f
commit 3d89711
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Dedicated Thread Executor | ||
|
||
Android only feature. | ||
Would be mostly used in brownfield apps and [in edge cases with some android devices.](https://github.com/react-native-community/async-storage/issues/159) | ||
|
||
## Motivation | ||
|
||
Dedicated thread pool executor makes `AsyncStorage` use separate thread pool for its tasks execution. | ||
|
||
Use this feature if `THREAD_POOL_EXECUTOR` from `AsyncTasks`: | ||
|
||
- Is used in your app, so that background tasks are queued most of the time | ||
- Acts weird on your device (for example, waits for some time before execution) | ||
|
||
## How to use | ||
|
||
Add a `AsyncStorage_dedicatedExecutor` property to your `android/gradle.properties`: | ||
|
||
``` | ||
AsyncStorage_dedicatedExecutor=true | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters