All Downloads are FREE. Search and download functionalities are using the official Maven repository.

apparat.actors.Futures.scala Maven / Gradle / Ivy

package apparat.actors

import scala.actors.{Futures => SFutures}

object Futures {
	private val enabled = Actor.threadsEnabled

	def future[T](body: => T): () => T = {
		if(enabled) {
			SFutures.future(body)
		} else {
			val result: T = body
			() => { result }
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy