(unless (eq? (build-platform) 'msvc)
(set! ##sys#read-prompt-hook
(let ([old ##sys#read-prompt-hook]
[thread-yield! thread-yield!] )
(lambda ()
(when (or (##sys#fudge 12) (##sys#tty-port? ##sys#standard-input))
(old)
(##sys#thread-block-for-i/o! ##sys#current-thread 0 #t)
(thread-yield!)))) ) )
in srfi-18 is how it handles the special case of the repl. i rather doubt
it would work for readline.
-elf
On Tue, 4 Mar 2008, Jim Ursetto wrote:
Unit SRFI-18:
"Blocking I/O will block all threads, except for some socket operations (see the
section about the tcp unit). An exception is the read-eval-print loop on UNIX
platforms: waiting for input will not block other threads, provided the current
input port reads input from a console."
On 3/4/08, Shawn Rutledge <[EMAIL PROTECTED]> wrote:
On Tue, Mar 4, 2008 at 12:05 PM, Elf <[EMAIL PROTECTED]> wrote:
um... repl will always block threads. as the docs state, read is
blocking
except for certain network ports.
If you try the example threaded loop without readline, it works.
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users