summaryrefslogtreecommitdiff
path: root/src/actors/scala/actors/Future.scala
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2009-09-24 18:28:17 +0000
committerPhilipp Haller <hallerp@gmail.com>2009-09-24 18:28:17 +0000
commit92fc7b37b01bc871966a49524197c1cbbeec8988 (patch)
tree7fad3d6cff9bf825e7018d26407413988c9a04f4 /src/actors/scala/actors/Future.scala
parent6fea2488af12d942c1cf7ba781d2f60fe6ddc9c0 (diff)
downloadscala-92fc7b37b01bc871966a49524197c1cbbeec8988.tar.gz
scala-92fc7b37b01bc871966a49524197c1cbbeec8988.tar.bz2
scala-92fc7b37b01bc871966a49524197c1cbbeec8988.zip
Introduced actors package object to deprecate a...
Introduced actors package object to deprecate a number of classes. Made ForkJoinScheduler more configurable and let it read ThreadPoolConfig. Clean-ups in TerminationMonitor and ActorGC. Removed DefaultExecutorScheduler. Made DelegatingScheduler and ExecutorScheduler private. Deprecated MessageQueue and MessageQueueElement, so that we can later make them private. Deprecated a number of methods in IScheduler. Tightened access modifiers in Reactor.
Diffstat (limited to 'src/actors/scala/actors/Future.scala')
-rw-r--r--src/actors/scala/actors/Future.scala11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/actors/scala/actors/Future.scala b/src/actors/scala/actors/Future.scala
index 5ed758a65b..ec07f2a1a8 100644
--- a/src/actors/scala/actors/Future.scala
+++ b/src/actors/scala/actors/Future.scala
@@ -25,9 +25,9 @@ import scheduler.DefaultThreadPoolScheduler
* </p>
*
* @author Philipp Haller
- * @version 0.9.16
*/
abstract class Future[+T](val inputChannel: InputChannel[T]) extends Responder[T] with Function0[T] {
+ @deprecated("this member is going to be removed in a future release")
protected var value: Option[Any] = None
def isSet: Boolean
}
@@ -35,17 +35,14 @@ abstract class Future[+T](val inputChannel: InputChannel[T]) extends Responder[T
/**
* The <code>Futures</code> object contains methods that operate on Futures.
*
- * @version 0.9.8
* @author Philipp Haller
*/
object Futures {
- private lazy val sched = new DefaultThreadPoolScheduler(true)
+ private case object Eval
def future[T](body: => T): Future[T] = {
- case object Eval
- val a = new Actor {
- override def scheduler: IScheduler = sched
+ val a = new DaemonActor {
def act() {
Actor.react {
case Eval => Actor.reply(body)
@@ -139,7 +136,7 @@ object Futures {
results
}
- def fromInputChannel[T](inputChannel: InputChannel[T]): Future[T] =
+ private[actors] def fromInputChannel[T](inputChannel: InputChannel[T]): Future[T] =
new Future[T](inputChannel) {
def apply() =
if (isSet) value.get.asInstanceOf[T]