Parcourir la source

core_loading_thread example join thread on completion (#2845)

* core_loading_thread example join thread on completion

* error checking
pull/2846/head
Antonis Geralis il y a 2 ans
committed by GitHub
Parent
révision
ba38fe5b97
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. +4
    -0
      examples/core/core_loading_thread.c

+ 4
- 0
examples/core/core_loading_thread.c Voir le fichier

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

Chargement…
Annuler
Enregistrer