Merge branch 'master' of github.com:jboner/akka

This commit is contained in:
Jonas Bonér 2011-04-23 11:57:20 +02:00
commit a2da2bfa02

View file

@ -242,10 +242,15 @@ object Future {
* Construct a completable channel
*/
def channel(timeout: Long = Actor.TIMEOUT) = new Channel[Any] {
val future = new DefaultCompletableFuture[Any](timeout)
val future = empty[Any](timeout)
def !(msg: Any) = future << msg
}
/**
* Create an empty Future with default timeout
*/
def empty[T](timeout : Long = Actor.TIMEOUT) = new DefaultCompletableFuture[T](timeout)
import scala.collection.mutable.Builder
import scala.collection.generic.CanBuildFrom