-
Notifications
You must be signed in to change notification settings - Fork 136
Separating Task Executors
johnmcclean-aol edited this page Mar 23, 2015
·
1 revision
Each stage in a simple-react flow can be executed by a different task executor, this is one option for giving different amounts of resources to each stage in a flow.
new SimpleReact(fastStageTaskExecutor)
.react( () -> 1, () ->2)
.then( input -> input*100)
.withTaskExecutor(slowStageTaskExecutor)
.then(input -> writeToDb(input))
.withTaskExecutor(fastStageTaskExecutor)
.then(input -> respond(input))
oops - my bad