Skip to content

Commit

Permalink
sleep of non-positive duration now returns immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerrg committed Mar 11, 2021
1 parent ee31146 commit 5342bb3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions LOG
Original file line number Diff line number Diff line change
Expand Up @@ -2146,3 +2146,5 @@
c/expeditor.c, c/externs.h, c/prim5.c, c/scheme.c, c/stats.c
- fix signature of generate-temporaries
primdata.ss primvars.ss
- sleep of negative durations now returns immediately
7.ss
6 changes: 6 additions & 0 deletions release_notes/release_notes.stex
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,12 @@ in fasl files does not generally make sense.
%-----------------------------------------------------------------------------
\section{Bug Fixes}\label{section:bugfixes}

\subsection{\protect\scheme{sleep} with negative duration (9.5.5)}

Prior to this release, \scheme{sleep} of a negative duration would
result in an infinite pause in Windows. Now \scheme{sleep} returns
immediately on all platforms when given a negative duration.

\subsection{Flonum \protect\scheme{remainder} and \protect\scheme{modulo} (9.5.5)}

The \scheme{remainder} and \scheme{modulo} functions could produce
Expand Down
4 changes: 3 additions & 1 deletion s/7.ss
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,9 @@
(lambda (t)
(unless (and (time? t) (eq? (time-type t) 'time-duration))
($oops who "~s is not a time record of type time-duration" t))
(fp (time-second t) (time-nanosecond t)))))
(let ([s (time-second t)])
(when (>= s 0)
(fp s (time-nanosecond t)))))))

(define $scheme-greeting
(lambda ()
Expand Down

0 comments on commit 5342bb3

Please sign in to comment.