diff options
| author | Andy Wingo <wingo@pobox.com> | 2017-02-12 18:13:44 +0100 |
|---|---|---|
| committer | Andy Wingo <wingo@pobox.com> | 2017-02-12 18:13:44 +0100 |
| commit | 11c079b67599e3ee1841ff5376d4a52e7a657c8d (patch) | |
| tree | 594ab765add272b805f6da65c36a2077a364fd06 | |
| parent | Add concurrent web server (diff) | |
| download | guile-fibers-11c079b67599e3ee1841ff5376d4a52e7a657c8d.tar.gz | |
Cope with migration of initial fiber
* fibers.scm (run-fibers): Allow migration of main fiber.
| -rw-r--r-- | fibers.scm | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -114,7 +114,10 @@ (error "run-fibers requires initial fiber thunk when creating sched")) (spawn-fiber (lambda () (call-with-values init - (lambda vals (atomic-box-set! ret vals)))) + (lambda vals (atomic-box-set! ret vals))) + ;; Could be that this fiber was migrated away. + ;; Make sure to wake up the main scheduler. + (spawn-fiber (lambda () #t) scheduler)) scheduler) (match affinities ((affinity . affinities) |
