Evaluate form with a timeout (in seconds)
Evaluate form with a timeout in seconds.
The general form is:
with-timeout duration body timeout-form
The signature of body and timeout-form should be the same.
This form should be called either at the top-level or in an environment where state is available and body has no free variables other than state. If the timeout-form is a long running computation, then the purpose of with-timeout is defeated.
Usage: (with-timeout 5 (fibonacci 40) :timed-out) :doc with-timeout