Welcome to the CHICKEN Scheme pasting service
Internal scheduler error: unknown thread state added by klm` on Wed May 30 10:53:55 2018
;; I get: ;;; ;;; Warning (#<thread: thread1>): in thread: (mutex-unlock) Internal scheduler error: unknown thread state ;;; #<thread: primordial> ;;; ready ;;; ;;; on C4.13 and C5, csc and csi ;;; ;;; why? ;;; (cond-expand (chicken-5 (import (chicken process signal) srfi-18)) (else (use posix srfi-18))) (define m (make-mutex)) (thread-start! (lambda () (let loop () (mutex-lock! m) (thread-yield!) (mutex-unlock! m) (loop)))) (let loop () (if (mutex-lock! m 0) (begin (thread-yield!) (mutex-unlock! m) (loop)) (begin (thread-yield!) (loop))))