From 98486667f4a1745b281c50547fd809c059cc9212 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 8 Jun 2021 09:29:49 +0200 Subject: [PATCH] gen:custom-write for turn --- syndicate/actor.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syndicate/actor.rkt b/syndicate/actor.rkt index 67af5ce..5625af2 100644 --- a/syndicate/actor.rkt +++ b/syndicate/actor.rkt @@ -121,7 +121,10 @@ (struct turn (id active-facet - [queues #:mutable])) + [queues #:mutable]) + #:methods gen:custom-write + [(define (write-proc t port mode) + (fprintf port "#" (turn-id t) (if (turn-committed? t) ":committed" "")))]) ;;---------------------------------------------------------------------------