diff --git a/collects/scribblings/futures/futures.scrbl b/collects/scribblings/futures/futures.scrbl new file mode 100644 index 0000000000..81698ffccd --- /dev/null +++ b/collects/scribblings/futures/futures.scrbl @@ -0,0 +1,35 @@ +#lang scribble/doc + +@title{@bold{Futures}: Fine-grained Parallelism} + +@; ---------------------------------------------------------------------- + +@(require scribble/manual + scribble/urls + scribble/struct + scheme/class + (for-label scheme/base + scheme/gui/base + scheme/class + scheme/contract)) + +@; ---------------------------------------------------------------------- + +PLT's future support is only enabled if you pass @tt{--enable-futures} to @tt{configure} when +you build PLT (and that build currently only works with @tt{mzscheme}, not with @tt{mred}). + +@defmodule['#%futures]{} + +@defproc[(future [thunk (-> any)]) future?]{ + Starts running @scheme[thunk] in parallel. +} + +@defproc[(touch [f future?]) any]{ + Returns the value computed in the future @scheme[f], blocking + to let it complete if it hasn't yet completed. +} + +@defproc[(future? [x any/c]) boolean?]{ + Returns @scheme[#t] if @scheme[x] is a future. +} + diff --git a/collects/scribblings/futures/info.ss b/collects/scribblings/futures/info.ss new file mode 100644 index 0000000000..2d6205d396 --- /dev/null +++ b/collects/scribblings/futures/info.ss @@ -0,0 +1,3 @@ +#lang setup/infotab + +(define scribblings '(("futures.scrbl" ())))