Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
clim-tos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alastair Bridgewater
clim-tos
Commits
e565e0ec
Commit
e565e0ec
authored
7 years ago
by
Daniel Kochmański
Browse files
Options
Downloads
Patches
Plain Diff
sleep: fix faulty process-wait-with-timeout
parent
21244d0f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demo/graphics-demos.lisp
+2
-2
2 additions, 2 deletions
demo/graphics-demos.lisp
utils/processes.lisp
+4
-0
4 additions, 0 deletions
utils/processes.lisp
with
6 additions
and
2 deletions
demo/graphics-demos.lisp
+
2
−
2
View file @
e565e0ec
...
...
@@ -178,7 +178,7 @@ rotation and scaling."
(
with-scaling
(
stream
i
)
(
draw-polygon*
stream
(
aref
*polygons*
number-of-sides
)
:filled
t
:ink
(
if
(
oddp
i
)
+background-ink+
+foreground-ink+
))))
(
demo-sleep
stream
2
))))))
(
demo-sleep
stream
0.1
))))))
(
defparameter
*random-ink-list*
(
list
+red+
+green+
+blue+
...
...
@@ -221,7 +221,7 @@ to the window in which it is displayed."
;; draw finish
(
draw-circle*
stream
330
280
5
)
(
demo-sleep
stream
3
)
(
demo-sleep
stream
0.
3
)
;; draw a solution path
(
draw-polygon*
stream
'
(
30
60
570
60
570
460
130
460
130
140
490
140
...
...
This diff is collapsed.
Click to expand it.
utils/processes.lisp
+
4
−
0
View file @
e565e0ec
...
...
@@ -216,9 +216,13 @@
(
defun
process-wait
(
reason
predicate
)
(
declare
(
ignore
reason
))
(
loop
(
when
(
funcall
predicate
)
(
return
))
(
sleep
0.1
)
(
process-yield
)))
(
defun
process-wait-with-timeout
(
reason
timeout
predicate
)
(
declare
(
ignorable
timeout
))
(
process-wait
reason
predicate
)
#+
(
or
)
;; timeout is verified with a predicate (see above) o_O
(
if
(
and
(
numberp
timeout
)
(
not
(
zerop
timeout
)))
(
bt:with-timeout
(
timeout
)
(
process-wait
reason
predicate
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment