瀏覽代碼

core_loading_thread example join thread on completion (#2845)

* core_loading_thread example join thread on completion

* error checking
pull/2846/head
Antonis Geralis 2 年之前
committed by GitHub
父節點
當前提交
ba38fe5b97
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. +4
    -0
      examples/core/core_loading_thread.c

+ 4
- 0
examples/core/core_loading_thread.c 查看文件

@ -72,6 +72,10 @@ int main(void)
if (atomic_load(&dataLoaded))
{
framesCounter = 0;
int error = pthread_join(threadId, NULL);
if (error != 0) TraceLog(LOG_ERROR, "Error joining loading thread");
else TraceLog(LOG_INFO, "Loading thread terminated successfully");
state = STATE_FINISHED;
}
} break;

Loading…
取消
儲存