+ 1
How to write a thread program in c?
Multithreading or in short threading in c
2 odpowiedzi
+ 14
Unlike Java, multithreading is not supported by the language standard. POSIX Threads (or Pthreads) is a POSIX standard for threads. Implementation of pthread is available with gcc compiler.
For more 👇
https://www.geeksforgeeks.org/multithreading-c-2/
+ 3
Use the C11 threads.h:
http://en.cppreference.com/w/c/thread
Note: You must use the musl library instead of glibc, as it's the only library I know of that implements the header.
Edit: Here's a small header file that implements the threads.h interface on top of POSIX threads: https://github.com/jtsiomb/c11threads