Sfoglia il codice sorgente

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 anni fa
committed by GitHub
parent
commit
ba38fe5b97
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      examples/core/core_loading_thread.c

+ 4
- 0
examples/core/core_loading_thread.c Vedi File

@ -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;

Caricamento…
Annulla
Salva