mirror of
https://github.com/MaintainTeam/Hypatia.git
synced 2025-02-28 21:38:21 +03:00
Fix the downloader
With all databases enabled the ThreadPool queue is exceed (25>16). This normally isn't an issue for other users of the pool as it will get pushed onto the main thread. But Android prohibits network activity on the main thread, which the downloader runs from. Increase it 32 which should be suitable for now. Maybe consider adding a separate pool in future. Fixes https://github.com/Divested-Mobile/Hypatia/issues/34 Fixes https://gitlab.com/divested-mobile/hypatia/-/issues/31 Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
e018000c46
commit
22cc72ab87
3 changed files with 3 additions and 2 deletions
|
@ -6,7 +6,7 @@ android {
|
|||
applicationId "us.spotco.malwarescanner"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 32
|
||||
versionCode 101
|
||||
versionCode 102
|
||||
versionName "2.32"
|
||||
resConfigs 'en', 'af', 'de', 'es', 'fi', 'fr', 'it', 'pl', 'pt', 'ru', 'tr', 'zh-rCN'
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class Utils {
|
|||
}
|
||||
|
||||
public static ThreadPoolExecutor getNewThreadPoolExecutor(int threads) {
|
||||
return new ThreadPoolExecutor(threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(16), new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
return new ThreadPoolExecutor(threads, threads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(32), new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
}
|
||||
|
||||
public static int getMaxThreads() {
|
||||
|
|
1
fastlane/metadata/android/en-US/changelogs/102.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/102.txt
Normal file
|
@ -0,0 +1 @@
|
|||
* Fix the downloader when many databases are enabled
|
Loading…
Add table
Reference in a new issue