]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: lua: Add act:wake_time() function to set a timeout when an action yields
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 31 Jan 2020 18:07:52 +0000 (19:07 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2020 14:13:04 +0000 (15:13 +0100)
commit2c2c2e381bc2d1488ca4d85611379e824605ea3c
treeb2171818e525cf7f65a57c65cc288b81444bb20e
parent0f3c8907c320d9c2c44c7fbecc843996756081ec
MINOR: lua: Add act:wake_time() function to set a timeout when an action yields

This function may be used to defined a timeout when a lua action returns
act:YIELD. It is a way to force to reexecute the script after a short time
(defined in milliseconds).

Unlike core:sleep() or core:yield(), the script is fully reexecuted if it
returns act:YIELD. With core functions to yield, the script is interrupted and
restarts from the yield point. When a script returns act:YIELD, it is finished
but the message analysis is blocked on the action waiting its end.
doc/lua-api/index.rst
src/hlua.c