diff options
| author | Andy Wingo <wingo@pobox.com> | 2017-01-08 14:17:56 +0100 |
|---|---|---|
| committer | Andy Wingo <wingo@pobox.com> | 2017-01-08 14:17:56 +0100 |
| commit | 2d31bd4ba7df8966301e517717c52dae504aec1c (patch) | |
| tree | b80105dbb0d5d377febde72c4714f2b2548a64f7 | |
| parent | Peer schedulers share a prompt tag (diff) | |
| download | guile-fibers-2d31bd4ba7df8966301e517717c52dae504aec1c.tar.gz | |
Enable preemption by default
* fibers.scm (run-fibers): Enable preemption by default with a period of
10ms.
| -rw-r--r-- | fibers.scm | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -24,8 +24,7 @@ #:use-module (fibers repl) #:use-module (fibers timers) #:use-module (fibers interrupts) - #:use-module ((ice-9 threads) - #:select (current-thread current-processor-count)) + #:use-module (ice-9 threads) #:use-module ((ice-9 ports internal) #:select (port-read-wait-fd port-write-wait-fd)) #:use-module (ice-9 suspendable-ports) @@ -73,7 +72,7 @@ (lp (1+ i))))))) (define* (run-fibers #:optional (init #f) - #:key (hz 0) (scheduler #f) + #:key (hz 100) (scheduler #f) (parallelism (current-processor-count)) (install-suspendable-ports? #t)) (when install-suspendable-ports? (install-suspendable-ports!)) |
