Skip to content

Instantly share code, notes, and snippets.

@moreindirection
Created May 17, 2011 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moreindirection/977598 to your computer and use it in GitHub Desktop.
Save moreindirection/977598 to your computer and use it in GitHub Desktop.
Dataflow Futures
import actors.Futures
class DataflowFuture[A] private(f : => A) {
val future = Futures.future(f)
}
object DataflowFuture {
def apply[A](f : => A) = new DataflowFuture[A](f)
implicit def dataflowFutureToVal[A](df : DataflowFuture[A]) : A = df.future.apply()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment