| 581 | } |
| 582 | |
| 583 | void 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 | |
| 593 | void GameEventHandler::InvokeAsync(std::weak_ptr<void> reference, Function<void()>&& callback) |
| 594 | { |
no test coverage detected