Adding 'asynchronous' init of actors (done blocking right now to maintain backwards compat)

This commit is contained in:
Viktor Klang 2011-09-16 15:28:43 +02:00
parent 56cbf6de6c
commit 9b21dd0af3
15 changed files with 139 additions and 198 deletions

View file

@ -50,12 +50,6 @@ object MessageDispatcher {
* @author <a href="http://jonasboner.com">Jonas Bon&#233;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
}
/**