Pablichjenkov
04/01/2025, 9:05 PMsuspend fun transform(input: I): O {
return withContext(defaultDispatcher) {
applyTransform(input)
}
Sonar claims this:
Remove this dispatcher. It is pointless when used with only suspending functions.
In my library I want to make sure this transformation runs in the default dispatcher. I understand that it will be better performance if there is no context switch but then how I enforce the library users to use the right dispatcher. Other than in the documentationZach Klippenstein (he/him) [MOD]
04/01/2025, 9:20 PMPablichjenkov
04/01/2025, 9:35 PMZach Klippenstein (he/him) [MOD]
04/01/2025, 10:58 PMPablichjenkov
04/01/2025, 11:30 PMuli
04/02/2025, 2:16 PM