#include #include #include void *printDots() { for (int i = 0; i < 5000; ++i) { printf("."); } printf("\nThread exiting\n"); return NULL; } int main(int argc, char *argv[]) { pthread_t th; pthread_create(&th, NULL, printDots, NULL); for (int i = 0; i < 5000; ++i) { printf("*"); } pthread_join(th, NULL); /* On attend la fin du thread */ printf("\nMain exiting\n"); return EXIT_SUCCESS; }