Does retrofit support virtual thread pool #4683
-
|
Hello, currently, Spring Boot 3 and JDK 21 support virtual threads, which perform exceptionally well in efficiently handling I/O-intensive tasks. When blocking operations (such as network requests, database queries) occur, virtual threads will automatically suspend and release the underlying platform threads, allowing the latter to continue executing other tasks, thereby significantly improving throughput. Can Retrofit support virtual threads? I think it would be beneficial to distinguish between I/O-intensive and CPU-intensive tasks. For I/O-intensive tasks, virtual threads can enhance throughput, which would be a significant improvement for my service |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Retrofit maintains no threads. Threading is entirely managed by OkHttp, which does support virtual threads (but probably as an opt-in). |
Beta Was this translation helpful? Give feedback.
Retrofit maintains no threads. Threading is entirely managed by OkHttp, which does support virtual threads (but probably as an opt-in).