4 Jun
2018
4 Jun
'18
08:24
Per Jessen wrote:
The queue manipulation is key, the mux is uninteresting. The reason I am looking at this is that a thread got hung up (over the weekend) - in the core dump, a signal handler was called and tried to write to the queue whilst someone was reading from the queue. It's possible that is why I had to move to using semaphores - I wonder if pthread_mutex_lock is async-safe.
I think that has to be the reasoning - pthread_mutex_lock/-unlock are not safe to call from a signal handler, whereas sem_wait/-post are. I'll have to double check. /Per -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-programming+owner@opensuse.org