Summary
File ports should be nonblocking
Metadata
- Id: 738bab2c0af525fed5925bdeaf1ddcc781f8ae27
- Trac id: 1303
- Type: defect
- Reporter: sjamaan
- Owner:
- Cc:
- Status: new
- Component: unknown
- Estimated difficulty: hard
- Resolution:
- Priority: major
- Milestone: 6.0.0
- Version: 4.11.0
- Changetime: 2023-11-06 23:43:46 UTC
- Created: 2016-06-30 19:14:45 UTC
- Keywords:
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)