diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-24 10:37:35 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-24 10:37:35 +0100 |
commit | 0fb7ce6a7de8454d2eddb390ff6188836cd105e2 (patch) | |
tree | 332cb8f9ec6d1ebb2e157d15b3b72c593fd28b71 | |
parent | d1324285bbbd15f9d8199c6674d0d38c35e381b0 (diff) | |
download | bffe-0fb7ce6a7de8454d2eddb390ff6188836cd105e2.tar bffe-0fb7ce6a7de8454d2eddb390ff6188836cd105e2.tar.gz |
Set a custom printer for the fibers scheduler
In case this causes reliability problems.
-rw-r--r-- | bffe/server.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bffe/server.scm b/bffe/server.scm index 7da2991..5eb8d0d 100644 --- a/bffe/server.scm +++ b/bffe/server.scm @@ -18,6 +18,8 @@ (define-module (bffe server) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) + #:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-11) #:use-module (srfi srfi-19) #:use-module (srfi srfi-71) @@ -36,6 +38,7 @@ #:use-module (prometheus) #:use-module (system repl error-handling) #:use-module (fibers) + #:use-module (fibers scheduler) #:use-module (fibers channels) #:use-module (fibers conditions) #:use-module (fibers web server) @@ -53,6 +56,13 @@ #:use-module (bffe view activity) #:export (start-bffe-web-server)) +;; TODO Work around this causing problems with backtraces +;; https://github.com/wingo/fibers/issues/76 +(set-record-type-printer! + (@@ (fibers scheduler) <scheduler>) + (lambda (scheduler port) + (display "#<scheduler>" port))) + (define (make-state-channel) (let ((channel (make-channel))) (call-with-new-thread |