diff options
| author | Andy Wingo <wingo@pobox.com> | 2016-12-12 16:41:18 +0100 |
|---|---|---|
| committer | Andy Wingo <wingo@pobox.com> | 2016-12-12 16:41:18 +0100 |
| commit | e3f86220774856c3c7978a4d2530b9369058c3fe (patch) | |
| tree | 071a37e67ac778fa10aa8b314b2611f283e43978 | |
| parent | Describe fibers as being Go-like rather than Erlang-like. (diff) | |
| download | guile-fibers-e3f86220774856c3c7978a4d2530b9369058c3fe.tar.gz | |
Update spawn-fiber documentation
| -rw-r--r-- | fibers.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fibers.texi b/fibers.texi index 2870ccb..ba1fdc1 100644 --- a/fibers.texi +++ b/fibers.texi @@ -437,7 +437,8 @@ explicitly pass @code{#t} as the @code{#:keep-scheduler?} keyword argument. @end defun -@defun spawn-fiber thunk [#:scheduler=@code{(require-current-scheduler)}] +@defun spawn-fiber thunk [scheduler=@code{(require-current-scheduler)}] @ + [#:dynamic-state=@code{(current-dynamic-state)}] Spawn a new fiber that will run @var{thunk}. Return the new fiber. The new fiber will run concurrently with other fibers. @@ -450,6 +451,11 @@ keyword argument. Currently, fibers will only ever be run within the scheduler to which they are first added, which effectively pins them to a single kernel thread. This limitation may be relaxed in the future. + +The fiber will inherit the fluid--value associations (the dynamic +state) in place when @code{spawn-fiber} is called. Any +@code{fluid-set!} or parameter set within the fiber will not affect +fluid or parameter bindings outside the fiber. @end defun @defun current-fiber |
