add version of call-timeout that doesn't convert args
call-timeout-raw, it's your job to convert them
This commit is contained in:
parent
762853acce
commit
0dc976913c
|
@ -146,6 +146,14 @@
|
|||
(.evaluateString ctx scope code filename line-number sec-domain)
|
||||
(finally (Context/exit)))))
|
||||
|
||||
(defn call-timeout-raw [scope fun timeout-ms & args]
|
||||
(let [factory (TimedContextFactory. timeout-ms)
|
||||
ctx (.enterContext factory)
|
||||
args (into-array Object args)]
|
||||
(try
|
||||
(.call fun ctx scope nil args)
|
||||
(finally (Context/exit)))))
|
||||
|
||||
(defn call-timeout [scope fun timeout-ms & args]
|
||||
(let [factory (TimedContextFactory. timeout-ms)
|
||||
ctx (.enterContext factory)
|
||||
|
|
Reference in a new issue