Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
doc:plans [2014/01/21 10:32] – [with-policy] winkler | doc:plans [2014/01/21 10:34] – [with-policy] winkler | ||
---|---|---|---|
Line 59: | Line 59: | ||
| | ||
(with-named-policy ' | (with-named-policy ' | ||
- | (loop do (format t "Main loop cRight now, just a `timeout-policy` is available that the given `body` stops code after a given amount of time (in seconds) if it hasn't finished by then. | + | (loop do (format t "Main loop cycle.~%") |
- | + | ||
- | Use it like this: | + | |
- | ```lisp | + | |
- | (with-policy cpl: | + | |
- | (body-code-goes-here)) | + | |
- | ``` | + | |
- | And for catching the check condition when the timeout actually happens: | + | |
- | ```lisp | + | |
- | (with-failure-handling | + | |
- | ((policy-check-condition-met (f) | + | |
- | (declare (ignore f)) | + | |
- | (handle-error-here-and-maybe-retry))) | + | |
- | (with-policy cpl: | + | |
- | (body-code-goes-here))) | + | |
- | ```ycle.~%") | + | |
| | ||
</ | </ |