I have just read chapter about threads and I just want to ask quick question. What is the best way to pass data from threads to main process? Is it using global variables ( and of course using mutex ) or using pthread_setspesific and pthread_getspesific function?
You know, this chapter make me confuse so much. Thank you.