mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-06-26 07:03:22 +00:00
![]() This is an initial prototype for ways we could better integrate Lua's asynchronous functionality (coroutines) with peripherals and other Lua APIs. The existing system assumes that coroutines each have a backing thread, and so yields will suspect the current thread. This takes inspiration from various "promise" libraries - asynchronous operations (such as executing on the main thread or waiting for an event) return a promise - the result of which can be consumed with `.then`. While I am not aware of plans to change the Lua implementation, this does give us greater flexibility in the future, leading the way for Rembulan, single-threaded Cobalt, and even possibly OC support. |
||
---|---|---|
.. | ||
main |