Adding 'asynchronous' init of actors (done blocking right now to maintain backwards compat)
This commit is contained in:
parent
56cbf6de6c
commit
9b21dd0af3
15 changed files with 139 additions and 198 deletions
|
|
@ -50,12 +50,6 @@ object MessageDispatcher {
|
|||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
abstract class MessageDispatcher extends Serializable {
|
||||
|
||||
private def writeObject(out: java.io.ObjectOutputStream) {
|
||||
(new Exception).printStackTrace()
|
||||
throw new Exception("Damn you!")
|
||||
}
|
||||
|
||||
import MessageDispatcher._
|
||||
|
||||
protected val uuids = new ConcurrentSkipListSet[Uuid]
|
||||
|
|
@ -82,6 +76,9 @@ abstract class MessageDispatcher extends Serializable {
|
|||
guard withGuard {
|
||||
register(actor)
|
||||
}
|
||||
val promise = new ActorPromise(Timeout.never)(this)
|
||||
dispatchMessage(new MessageInvocation(actor, Init, promise))
|
||||
promise.get
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue