summaryrefslogtreecommitdiff
path: root/fibers.texi
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-12-16 16:45:47 +0100
committerAndy Wingo <wingo@pobox.com>2016-12-16 16:45:47 +0100
commitd19688cfeb47de79d8ef478adbf84b08f05e8dd6 (patch)
treebc7caa82ced3e145522603179f33aca2a1f3d3d6 /fibers.texi
parentAdd examples to fibers.texi (diff)
downloadguile-fibers-d19688cfeb47de79d8ef478adbf84b08f05e8dd6.tar.gz
Add REPL commands to manual
Diffstat (limited to 'fibers.texi')
-rw-r--r--fibers.texi37
1 files changed, 37 insertions, 0 deletions
diff --git a/fibers.texi b/fibers.texi
index b5ccced..b63d379 100644
--- a/fibers.texi
+++ b/fibers.texi
@@ -388,6 +388,7 @@ operations for channels and timers, and an internals interface.
* Operations:: Composable abstractions for concurrency.
* Channels:: Share memory by communicating.
* Timers:: Operations on time.
+* REPL Commands:: Experimenting with Fibers at the console.
* Internals:: Scheduler and fiber objects and operations.
@end menu
@@ -606,6 +607,42 @@ operation will succeed with no values.
Block the calling fiber until @var{seconds} have elapsed.
@end defun
+@node REPL Commands
+@section REPL Commands
+
+Fibers implements some basic extensions to the Guile command-line
+interface (its Read-Eval-Print Loop, or the REPL). Prefix these
+commands with a comma (@code{,}) to run them at the REPL; see
+@code{,help fibers} for full details, once you have loaded the
+@code{(fibers)} module of course.
+
+@deffn {REPL Command} scheds
+Show a list of all schedulers.
+@end deffn
+
+@deffn {REPL Command} spawn-sched
+Create a new scheduler for fibers, and run it on a new kernel thread.
+@end deffn
+
+@deffn {REPL Command} kill-sched sched
+Shut down the scheduler named @var{sched}. Use @code{,scheds} to list
+scheduler names.
+@end deffn
+
+@deffn {REPL Command} fibers [sched]
+Show a list of all fibers. If @var{sched} is given, limit to fibers
+bound to the given scheduler.
+@end deffn
+
+@deffn {REPL Command} spawn-fiber exp [sched]
+Spawn a new fiber that runs @var{exp}. If @var{sched} is given, the
+fiber will be spawned on the given scheduler.
+@end deffn
+
+@deffn {REPL Command} kill-fiber fiber
+Shut down a fiber.
+@end deffn
+
@node Internals
@section Internals