add Fence_waitAndDestroyRenderThread

This commit is contained in:
Nick Fisher
2025-06-18 13:03:34 +08:00
parent a5a3c73708
commit 86e0f7740f
2 changed files with 13 additions and 0 deletions

View File

@@ -310,6 +310,18 @@ extern "C"
auto fut = _renderThread->add_task(lambda);
}
EMSCRIPTEN_KEEPALIVE void Fence_waitAndDestroyRenderThread(TFence *tFence, uint32_t requestId, VoidCallback onComplete)
{
std::packaged_task<void()> lambda(
[=]() mutable
{
Fence_waitAndDestroy(tFence);
PROXY(onComplete(requestId));
});
auto fut = _renderThread->add_task(lambda);
}
EMSCRIPTEN_KEEPALIVE void Engine_destroyFenceRenderThread(TEngine *tEngine, TFence *tFence, uint32_t requestId, VoidCallback onComplete)
{
std::packaged_task<void()> lambda(