Switching to a cached version of Stack.empty, saving 16 bytes per Actor. Switching to purging the Promises in the ActorRefProvider after successful creation to conserve memory. Stopping to clone the props everytime to set the application default dispatcher, and doing a conditional in ActorCell instead.

This commit is contained in:
Viktor Klang 2011-10-18 11:26:35 +02:00
parent 4e960e5364
commit cb8a0adbb8
8 changed files with 139 additions and 150 deletions

View file

@ -40,6 +40,12 @@ trait ConnectionManager {
*/
def size: Int
/**
* Returns if the number of 'available' is 0 or not. Value could be stale as soon as received, and this method can't be combined (easily)
* with an atomic read of and isEmpty and version.
*/
def isEmpty: Boolean
/**
* Shuts the connection manager down, which stops all managed actors
*/
@ -90,6 +96,8 @@ class LocalConnectionManager(initialConnections: Iterable[ActorRef]) extends Con
def size: Int = state.get.connections.size
def isEmpty: Boolean = state.get.connections.isEmpty
def connections = state.get
def shutdown() {