You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abstract class UseCase<out Type, in Params> where Type : Any {
abstract suspend fun run(params: Params): Either<Failure, Type>
operator fun invoke(params: Params, onResult: (Either<Failure, Type>) -> Unit = {}) {
val job = async(CommonPool) { run(params) }
launch(UI) { onResult(job.await()) }
}
class None
}
I've somewhat confused with this. Does this abstract class use case violate the domain layer? Usecase should be dumb and doesn't know the coroutines?
I've somewhat confused with this. Does this abstract class use case violate the domain layer? Usecase should be dumb and doesn't know the coroutines?
cmiiw @android10
The text was updated successfully, but these errors were encountered: