Hello,
Here's another bit of work from the roadmap: it makes the behaviour of
`sleep` more intuitive in the presence or absence of threads. See the
commit message for details.
There's an accompanying patch for srfi-18 (attached) which I'm happy to
apply if this looks good.
Cheers,
Evan
Index: release/5/srfi-18/trunk/srfi-18.scm
===================================================================
--- release/5/srfi-18/trunk/srfi-18.scm (revision 33384)
+++ release/5/srfi-18/trunk/srfi-18.scm (working copy)
@@ -277,15 +277,8 @@
(##sys#add-to-ready-queue thread) ) )
(define (thread-sleep! tm)
- (define (sleep limit)
- (##sys#call-with-current-continuation
- (lambda (return)
- (let ((ct ##sys#current-thread))
- (##sys#setslot ct 1 (lambda () (return (##core#undefined))))
- (##sys#thread-block-for-timeout! ct limit)
- (##sys#schedule) ) ) ) )
(unless tm (##sys#signal-hook #:type-error 'thread-sleep! "invalid timeout argument" tm))
- (sleep (compute-time-limit tm 'thread-sleep!)) )
+ (##sys#thread-sleep! (compute-time-limit tm 'thread-sleep!)))
;;; Mutexes:
_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers