module TimeLimit(T)
Defined in:
time-limit.crConstant Summary
-
VERSION =
"0.1.0"
Class Method Summary
-
.spawn(limit : Time::Span, &block : -> T) : T | Nil
Spawn a fiber that with an execution time limit.
Class Method Detail
def self.spawn(limit : Time::Span, &block : -> T) : T | Nil
#
Spawn a fiber that with an execution time limit.
If the block runs successfully, the result is returned.
If the block raises an exception, it gets re-raised.
If the time limit is reached, a TimeLimit::TimeoutException
is raised.