chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #1303: File ports should be nonblocking


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1303: File ports should be nonblocking
Date: Fri, 01 Jul 2016 09:52:41 -0000

#1303: File ports should be nonblocking
----------------------+---------------------
  Reporter:  sjamaan  |      Owner:
      Type:  defect   |     Status:  new
  Priority:  major    |  Milestone:  someday
 Component:  unknown  |    Version:  4.11.0
Resolution:           |   Keywords:
----------------------+---------------------
Description changed by sjamaan:

Old description:

> As shown by this ugly little program, reading from regular files blocks.
>
> {{{
> (use srfi-18)
>
> (thread-start! (lambda () (let lp () (print "spinning") (thread-sleep!
> 0.2))))
> (thread-start! (lambda () (with-input-from-file "/dev/tty" (lambda ()
> (let lp () (print (cons 'read-from-tty (read))) (lp))))))
>
> (thread-sleep! 1000)
> }}}

New description:

 As shown by this ugly little program, reading from regular files blocks.

 {{{
 (use srfi-18)

 (thread-start! (lambda () (let lp () (print "spinning") (thread-sleep!
 0.2) (lp))))
 (thread-start! (lambda () (with-input-from-file "/dev/tty" (lambda () (let
 lp () (print (cons 'read-from-tty (read))) (lp))))))

 (thread-sleep! 1000)
 }}}

--

--
Ticket URL: <http://bugs.call-cc.org/ticket/1303#comment:1>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]