Skip to content

Instantly share code, notes, and snippets.

@mig35
Last active March 30, 2020 09:20
Show Gist options
  • Save mig35/abe0bec1565ce03b305607358ec411c0 to your computer and use it in GitHub Desktop.
Save mig35/abe0bec1565ce03b305607358ec411c0 to your computer and use it in GitHub Desktop.
open class ConcurrentStrategy : ExecutionStrategy {
override fun shouldAddToPendingActions(
pendingActionCommands: RemoveOnlyList<ActionCommand<*, *>>,
runningActionCommands: List<ActionCommand<*, *>>
): Boolean =
true
override fun shouldBlockOtherTask(pendingActionCommand: ActionCommand<*, *>): Boolean =
false
override fun shouldExecuteAction(
pendingActionCommands: RemoveOnlyList<ActionCommand<*, *>>,
runningActionCommands: List<ActionCommand<*, *>>
): Boolean =
true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment