Open PragmaTwice opened 3 weeks ago
We might be able to use a script flag like no-atomic
(or maybe the flag name isn't appropriate, we can discuss it further) to allow the user to choose to execute the script completely exclusively or allow the script using Context + Key Lock
.
Ahhh since the lua runtime is not thread-safe, we should remove the global lua context (inside Server) and utilize the worker-local lua runtimes (inside every Worker) to execute lua functions.
AS IS:
global lua runtime: EVAL, FCALL
worker-local lua runtimes: EVAL_RO, FCALL_RO
TO BE:
worker-local lua runtimes: EVAL, EVAL_RO, FCALL, FCALL_RO
Search before asking
Motivation
Solution
--
Are you willing to submit a PR?