[ThreadOpt]替换RxJava和Kotlin协程CPU和IO类型线程池

This commit is contained in:
renwj
2022-01-04 15:58:46 +08:00
parent c770b0c122
commit 8eb3439bfd
2 changed files with 14 additions and 0 deletions

View File

@@ -14,6 +14,18 @@ ByteX {
logLevel "DEBUG"
}
apply plugin: 'bytex.threadOpt'
thread_opt {
enable true
enableInDebug true
rxJavaIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;'
rxJavaComputationReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;'
coroutineIoReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getIoPool@@()Ljava/util/concurrent/ExecutorService;'
coroutineDefaultReplacer 'com/mogo/eagle/core/utilcode/util/ThreadUtils@@getCpuPool@@()Ljava/util/concurrent/ExecutorService;'
}
/*apply plugin: 'chain.log.hook'
hooklog{
enableLoggerToServer true