Ver a proveniência
core_loading_thread example join thread on completion (#2845)
* core_loading_thread example join thread on completion
* error checking
pull/2846/head
Antonis Geralis
há 2 anos
committed by
GitHub
ascendente
cometimento
ba38fe5b97
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados
ID da chave GPG: 4AEE18F83AFDEB23
1 ficheiros alterados com
4 adições e
0 eliminações
-
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; |
|
|
|