Hello, does anyone have an example how to set <Dis...
# android
p
Hello, does anyone have an example how to set Dispatchers.IO as okhttp3 Dispatcher?
g
I think only by implementing own custom CallAdapter that wraps blocking calls to Dispatcher.IO
Not sure that it is good solution tho
p
Thanks for the answer
g
What is your use case?
p
I want to reduce the amount of threads in my app.
g
Just reduce amount of threads on Dispatcher.IO and OkHttp default dispatcher, both of them are configurable
Using blocking API for this is probably will not help a lot, at least without proper integration on OkHttp dispatcher level
Also OkHttp dispatcher is more flexible