Changeset 33426 in project for release/5


Ignore:
Timestamp:
06/17/16 01:16:44 (2 years ago)
Author:
evhan
Message:

srfi-18: Update thread-sleep! to support new "sleep" behaviour in core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-18/trunk/srfi-18.scm

    r33262 r33426  
    278278
    279279(define (thread-sleep! tm)
    280   (define (sleep limit)
    281     (##sys#call-with-current-continuation
    282      (lambda (return)
    283        (let ((ct ##sys#current-thread))
    284          (##sys#setslot ct 1 (lambda () (return (##core#undefined))))
    285          (##sys#thread-block-for-timeout! ct limit)
    286          (##sys#schedule) ) ) ) )
    287280  (unless tm (##sys#signal-hook #:type-error 'thread-sleep! "invalid timeout argument" tm))
    288   (sleep (compute-time-limit tm 'thread-sleep!)) )
     281  (##sys#thread-sleep! (compute-time-limit tm 'thread-sleep!)))
    289282
    290283
Note: See TracChangeset for help on using the changeset viewer.