MINOR: lua-thread: Replace state_from by state_id
authorThierry Fournier <thierry.fournier@ozon.io>
Sat, 28 Nov 2020 22:42:03 +0000 (23:42 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Dec 2020 20:53:16 +0000 (21:53 +0100)
commit021d986ecc3b7bbdadf3196aabe029894ffc4a9a
tree7506c5778b60a45a9c583957aee97ace89f4cc94
parent62a22aa23f761a40c8b473bfdec07d01b7779846
MINOR: lua-thread: Replace state_from by state_id

The goal is to allow execution of one main lua state per thread.

"state_from" is a pointer to the parent lua state. "state_id"
is the index of the parent state id in the reference lua states
array. "state_id" is better because the lock is a "== 0" test
which is quick than pointer comparison. In other way, the state_id
index could index other things the the Lua state concerned. I
think to the function references.
include/haproxy/hlua-t.h
src/hlua.c