Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
silly
Browse files Browse the repository at this point in the history
  • Loading branch information
homchom committed Jan 4, 2024
1 parent 2a24c92 commit 1fa6bf7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import kotlin.coroutines.CoroutineContext

inline fun DerivedDispatcher(executor: Executor, crossinline immediatePredicate: () -> Boolean) =
DerivedDispatcher(
{ command ->
if (!immediatePredicate()) executor.execute(command)
{ block ->
if (immediatePredicate()) block.run() else executor.execute(block)
},
executor
)
Expand Down

0 comments on commit 1fa6bf7

Please sign in to comment.