@gantua @dalias @jschauma @mirabilos > If you have a stupid signal handler that sets a global variable its_time_to_exit = 1 which is just read elsewhere as a volatile, then once you add threads, suddenly you have an memory ordering issue
That's very much not the way I would do it or inter-thread communication, but if you want to do it that way then pthread_key_create, pthread_setspecific and pthread_getspecific are probably the answer to that problem.