(use posix srfi-18) (print "begin " (current-milliseconds)) (thread-start! (lambda () (print (with-input-from-pipe "sleep 5 ; echo foo" (lambda () (thread-wait-for-i/o! (port->fileno (current-input-port))) (read-string #f (current-input-port))))))) (thread-yield!) (print "end " (current-milliseconds))