summaryrefslogtreecommitdiff
path: root/doc/sl-logo.png
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-02-07 22:24:52 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-02-07 22:24:52 -0500
commit4ecfd706bce5c45556eaf2833f89fd9f2f5b07a9 (patch)
treedb24f93e18019b41fbab5fe7f76cb0009c212933 /doc/sl-logo.png
parent382ec7b2269546605da7ba0a44654deaadf3ff3c (diff)
Add LLLUAmanager::startScriptFile(), startScriptLine() functions.
Break out for LLLUAmanager consumers the promise/future semantics of waitScriptFile() and waitScriptLine(). startScriptMumble() uses runScriptMumble() to launch a coroutine to run the specified Lua script or chunk, providing an internal adapter callback to set a promise on completion. It then returns to its caller the future obtained from that promise. This allows a caller to call startScriptMumble(), run in parallel with the Lua coroutine for a while and then call get() on the returned future to wait for results. waitScriptMumble() is then trivially implemented using startScriptMumble(). Fix runScriptLine()'s logic to abbreviate the passed Lua chunk for use as the description. We were erroneously assigning back through a string_view of the parameter, which overwrote a temporary string in the argument list. With Lua 5.4, listen_events() tried to discover the main "thread" (Lua coroutine) associated with the current lua_State so we could call async callbacks on that thread. Luau doesn't seem to provide that feature, so run callbacks on whichever thread calls listen_events(). Reinstate original multi-argument lua_print_msg(), tweaked to avoid the Lua 5.4 lua_rotate() function, which is missing from Luau.
Diffstat (limited to 'doc/sl-logo.png')
0 files changed, 0 insertions, 0 deletions