C11 Threads simple example
suggest change#include <threads.h> #include <stdio.h> int run(void *arg) { printf("Hello world of C11 threads."); return 0; } int main(int argc, const char *argv[]) { thrd_t thread; int result; thrd_create(&thread, run, NULL); thrd_join(&thread, &result); printf("Thread return %d at the end\n", result); }
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents