Small corrections to the futures documentation.
This commit is contained in:
parent
98c9ad4d22
commit
bd799c3db9
|
@ -54,8 +54,8 @@ in parallel. See also @guidesecref["effective-futures"].
|
||||||
evaluation of the @racket[thunk] inside the given future, returning
|
evaluation of the @racket[thunk] inside the given future, returning
|
||||||
the values produced by @racket[thunk]. After @racket[touch] forces
|
the values produced by @racket[thunk]. After @racket[touch] forces
|
||||||
the evaluation of a @racket[thunk], the resulting values are retained
|
the evaluation of a @racket[thunk], the resulting values are retained
|
||||||
by the future descriptor in place of @racket[thunk], and additional
|
by the future in place of @racket[thunk], and additional
|
||||||
@racket[touch]es of the future descriptor return those values.
|
@racket[touch]es of the future return those values.
|
||||||
|
|
||||||
Between a call to @racket[future] and @racket[touch] for a given
|
Between a call to @racket[future] and @racket[touch] for a given
|
||||||
future, the given @racket[thunk] may run speculatively in parallel to
|
future, the given @racket[thunk] may run speculatively in parallel to
|
||||||
|
@ -68,7 +68,7 @@ in parallel. See also @guidesecref["effective-futures"].
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(current-future) any]{
|
@defproc[(current-future) (or/c #f future?)]{
|
||||||
Returns the descriptor for the future that is evaluating the current thunk.
|
Returns the descriptor for the future that is evaluating the current thunk.
|
||||||
If not currently running inside a future thunk (or
|
If not currently running inside a future thunk (or
|
||||||
futures are disabled), returns @racket[#f].
|
futures are disabled), returns @racket[#f].
|
||||||
|
@ -76,7 +76,7 @@ in parallel. See also @guidesecref["effective-futures"].
|
||||||
|
|
||||||
|
|
||||||
@defproc[(future? [v any/c]) boolean?]{
|
@defproc[(future? [v any/c]) boolean?]{
|
||||||
Returns @racket[#t] if @racket[v] is a future-descriptor value,
|
Returns @racket[#t] if @racket[v] is a future value,
|
||||||
@racket[#f] otherwise.
|
@racket[#f] otherwise.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user