How to split and dispatch an async control-flow using Continuations?
Posted
by hotzen
on Stack Overflow
See other posts from Stack Overflow
or by hotzen
Published on 2010-03-15T11:41:24Z
Indexed on
2010/03/15
22:59 UTC
Read the original article
Hit count: 202
Hello,
I have an asynchronous control-flow like the following:
ActorA ! DoA(dataA, callback1, callbackOnErrorA)
def callback1() = {
...
ActorB ! DoB(dataB, callback2, callbackOnErrorB)
}
def callback2() = {
ActorC ! DoC(dataC, callback3, callbackOnErrorC)
}
...
How would I divide this flow into several parts (continuations) and sequentially dispatch these to different actors (or threads/tasks) while maintaining the overall state?
Any hint appreciated, Thanks
© Stack Overflow or respective owner