I have a microservice on which I am using Kotlin coroutines to perform a bunch of db queries asynchronously, and I want to monitor the execution time for each one of those queries for potential performance optimization. The implementation I have is like this: As you can see I use Semaphore to limit the number of parallel jobs, and all
Tag: kotlin-coroutines
MapStruct + Kotlin/JVM(v1.5.10) Error: The return type Flow is an abstract class or interface
My project uses MapStruct successfully when it does not include Flux or Flow streams. When I try to generate a mapper with a Flow or Flux, I receive an error: “error: The return type Flow is an abstract class or interface.” Since Flow and Flux are interfaces, is there a way to still use MapStruct or do I have to
How Kotlin coroutines will use Project Loom? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago. Improve this question Right now, Kotlin coroutines are implemented without help of JVM. It does not use something like green (virtual) threads. You can
Caffeine: Use stale values when AsyncLoader fails to refresh
I want to configure my Caffeine cache to return stale results when loader fails to refresh the cache. The following Kotlin code demonstrates the case: I expect this test to pass but instead I get the following error: I wrote the code in Kotlin but I don’t think the issue is related to Kotlin coroutines. I want to configure Caffeine
Using coroutines in a right way
I am implementing the coroutine for first time. I am following MVP pattern for a simple login app. Here is my code flow – The login button clicked will follow this direction – LoginFragment -> LoginPresenter -> Repository -> APIRepository -> RetrofitInterface The login response will follow this direction – RetrofitInterface -> APIRepository -> Repository -> LoginPresenter -> LoginFragment Here