[CM] with-threaded-sound?

Bill Schottstaedt bil at ccrma.Stanford.EDU
Sun Jun 8 06:09:51 PDT 2008


I was confused.   I think this version of with-threaded-sound
works in Gauche:

(use gauche.threads)

(defmacro with-threaded-sound (args . body) 
  `(with-sound-helper 
    (lambda () 
      (let ((all-threads '()))
	,@(map (lambda (expr) 
		 `(let ((thread (make-thread (lambda () 
					       ,expr))))
		    (set! all-threads (cons thread all-threads))
		    (thread-start! thread)))
	       body)
	(for-each 
	 (lambda (thread) 
	   (thread-join! thread))
	 all-threads)))
    , at args)) 




More information about the Cmdist mailing list