(wrap-timeout thunk timeout)
Returns a function that wraps the given function in a timeout checker.
The timeout is specified in milliseconds. If the timeout is reached,
an exceptino will be thrown.
Source
(defn wrap-timeout
"Returns a function that wraps the given function in a timeout checker.
The timeout is specified in milliseconds. If the timeout is reached,
an exceptino will be thrown."
[thunk timeout]
(fn []
(thunk-timeout thunk timeout)))