diff options
| author | Antonis Geralis <[email protected]> | 2022-12-31 20:25:35 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-31 19:25:35 +0100 |
| commit | ba38fe5b97c2401830d612376d198f1d3c811969 (patch) | |
| tree | 528e9e2dc68b8a7a0ecbd1dfc18479879955311d /examples/core | |
| parent | dbdbbea47193ed19cd188dccbe694970387f810d (diff) | |
| download | raylib-ba38fe5b97c2401830d612376d198f1d3c811969.tar.gz raylib-ba38fe5b97c2401830d612376d198f1d3c811969.zip | |
core_loading_thread example join thread on completion (#2845)
* core_loading_thread example join thread on completion
* error checking
Diffstat (limited to 'examples/core')
| -rw-r--r-- | examples/core/core_loading_thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/core/core_loading_thread.c b/examples/core/core_loading_thread.c index 09ec7646..5ab8bbc3 100644 --- a/examples/core/core_loading_thread.c +++ b/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; |
