* Called by save thread to tell we finished saving. * @param proc The callback to call when saving is done. */
| 381 | * @param proc The callback to call when saving is done. |
| 382 | */ |
| 383 | static void SetAsyncSaveFinish(AsyncSaveFinishProc proc) |
| 384 | { |
| 385 | if (_exit_game) return; |
| 386 | while (_async_save_finish.load(std::memory_order_acquire) != nullptr) CSleep(10); |
| 387 | |
| 388 | _async_save_finish.store(proc, std::memory_order_release); |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * Handle async save finishes. |
no test coverage detected