MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / InvokeAsync

Method InvokeAsync

Sources/Main.cpp:583–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581}
582
583void GameEventHandler::InvokeAsync(Function<void()>&& callback)
584{
585 DEATH_DEBUG_ASSERT(callback, "callback cannot be empty", );
586
587#if defined(WITH_THREADS)
588 std::unique_lock<std::mutex> lock(_pendingCallbacksLock);
589#endif
590 _pendingCallbacks.emplace_back(std::weak_ptr<void>{}, std::move(callback));
591}
592
593void GameEventHandler::InvokeAsync(std::weak_ptr<void> reference, Function<void()>&& callback)
594{

Callers 2

OnInitializeMethod · 0.45
ChangeLevelMethod · 0.45

Calls 1

emplace_backMethod · 0.80

Tested by

no test coverage detected