I have a C program that calls threads.
iret1 = pthread_create( &thread1, NULL, readdata, NULL);
iret2 = pthread_create( &thread2, NULL, timer_func, NULL);
pthread_join(thread2, NULL);
Thread 2 returns after the execution of some function, after which I want to stop the execution of thread 1. How can I do this?
source
share