scala - Why method persist of PersistentActor doesn't return a Future? -


i have theoretical question. wrote code:

class account extends persistentactor {     def receivecommand = {         case block(id, amount) => persist(block(id, amount)){             case block(id, amount) =>                 persist(revertblock(id, s"id ${id} in processing",                    balance + amount))(_.revert())         }     }     ... } 

it looks bad. why method persist takes callback 2nd argument instead return future?

deal in context. sender() inside callback valid, not true futures.


Comments

Popular posts from this blog

renaming files in a directory using python or R -

c# - ajax - How to receive data both html and json from server? -