+ 12
Threading in c++
here what i recently found out about how to create threads in c++ program. https://code.sololearn.com/cldJfaAORdiT (it runs on code::blocks) I know there is more simple way to do sum of first n numbers however for better understanding of threads I have implemented using loop. I want to know about threading in c++. I have two questions : Q.1 what should I refer to learn more? Q.2 how can i run this code on solo-learn.
7 Respuestas
+ 17
Thank you.The Great Saga
+ 9
I don't know much about threading but
this might answer your questions.
https://www.tutorialspoint.com/cplusplus/cpp_multithreading.htm
+ 4
https://github.com/Saga305/Linux
+ 3
More on threading:
~thread memory management
~thread synchronization
~thread builtin method like pthread_join,pthread_exit,pthread_self,pthread_attr*, etc
+ 2
I don't personally know about threading in C++ so I can't answer that question,
but I have a few questions of my own for you:
Why are you using typedef?
Why are you using void pointers?
Why are you using a global variable?
If you know the type of variable you expect the function to be passed, then specify the type instead of using void pointers and assuming what you get is what you expected. I don't think it's necessary in this case to disregard C++'s built in type safety by using void pointers.
+ 1
you can get more codes for threading from above links