diff options
| author | Andy Wingo <wingo@pobox.com> | 2017-01-19 04:30:35 +0100 |
|---|---|---|
| committer | Andy Wingo <wingo@pobox.com> | 2017-01-19 04:40:07 +0100 |
| commit | bf3fb92cae269c4fbb43de099ababb3582ef49a6 (patch) | |
| tree | 94bfb889a039ad75331c184e7e88f52d4d7cc8d4 | |
| parent | Better findability for epoll extension. (diff) | |
| download | guile-fibers-bf3fb92cae269c4fbb43de099ababb3582ef49a6.tar.gz | |
Update documentation.
* fibers.texi (Using Fibers): Update.
| -rw-r--r-- | fibers.texi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fibers.texi b/fibers.texi index aa6c995..f2274d0 100644 --- a/fibers.texi +++ b/fibers.texi @@ -454,6 +454,7 @@ thread, use @code{run-fibers}. [#:install-suspendable-ports?=@code{#t}] @ [#:scheduler=@code{#f}] @ [#:parallelism=@code{(current-processor-count)}] @ + [#:cpus=@code{(getaffinity 0)}] @ [#:hz=100] Run @var{init-thunk} within a fiber in a fresh scheduler, blocking until the scheduler has no more runnable fibers. Return the value(s) @@ -488,7 +489,8 @@ If @code{run-fibers} creates a scheduler on your behalf, it will arrange for a number of ``peer'' schedulers to also be created, up to a total scheduler count controlled by the @var{parallelism} keyword argument. These peer schedulers will be run in separate threads and -will participate in work rebalancing. @xref{Parallelism}. +will participate in work rebalancing. The fibers will be run on the +CPUs specified by @var{cpus}. @xref{Parallelism}. By default @var{hz} is 100, indicating that running fibers should be preempted 100 times per every second of CPU time (not wall-clock @@ -738,10 +740,15 @@ if it is not currently running. @end defun @defun scheduler-remote-peers sched -Return a vector of peer schedulers of @var{sched}, not including +Return a list of peer schedulers of @var{sched}, not including @var{sched} itself. @end defun +@defun choose-parallel-scheduler sched +Return a random scheduler from @var{sched}'s peer set. Note that +@var{sched}'s peer set includes @var{sched} itself. +@end defun + @defun run-scheduler sched finished? Run @var{sched} until there are no more fibers ready to run, no file descriptors being waited on, and no more timers pending to run, and |
