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

PHP change url style -

renaming files in a directory using python or R -

ruby on rails - Carrierwave Timeout -