From 926fa1a9e1d1fe228404e05408854c4153131494 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 15 Jan 2016 23:49:08 -0500 Subject: [PATCH] Added notes regarding mutex lock issue --- examples/threading/producer-consumer.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/threading/producer-consumer.scm b/examples/threading/producer-consumer.scm index f5a72a38..c4398624 100644 --- a/examples/threading/producer-consumer.scm +++ b/examples/threading/producer-consumer.scm @@ -29,6 +29,11 @@ (let loop () ;(write (list (null? *queue*) *queue*)) (define sleep? #f) + ;; 2 issues here: + ;; - the mutex-lock seems to skip over cond; there is some kind of + ;; control flow problem + ;; - try compiling this but commenting out the Cyc_mutex_lock + ;; code in the C. there is a gc_move bag tag error at runtime (mutex-lock! *lock*)` (cond ((not (null? *queue*)) @@ -39,7 +44,7 @@ (set! sleep? #t))) (mutex-unlock! *lock*) (if sleep? (thread-sleep! 1000)) - ; (loop) + (loop) )) ;(thread-start! (make-thread producer))