mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-08 07:28:22 -10:00
This adds a Lua API for representing asynchronous operations and running coroutines based on those operations comfortably. This is very similar to features other languages have introduced such as C# or JavaScript. In fact, the whole "promise" thing is derived from how JavaScript represents these operations. This is the initial and very basic system for supporting async coroutines in Lua. There is no native support for running these operations at specific points (they run whenever the awaited promise resolved) or making sure they do not leak through different game states.
12 lines
139 B
C++
12 lines
139 B
C++
#pragma once
|
|
|
|
#include "scripting/ade_api.h"
|
|
|
|
namespace scripting {
|
|
namespace api {
|
|
|
|
DECLARE_ADE_LIB(l_Async);
|
|
|
|
}
|
|
} // namespace scripting
|