Sending signals between threads

I am new to multithreading. I have one doubt about signaling between threads.

I pick up the signal in one thread (say, thread 1).
I have a function (say f1) in thread 2 in which I register a signal.
Is it possible to exit the function f1, which belongs to stream2, when the signal is raised in stream 1. If possible, tell me how to do it. My OS is Linux, and I use ACE streams.

+4
source share
1 answer

in C ++ 11 you can use a condition variable as described here http://en.cppreference.com/w/cpp/thread/condition_variable

+2

All Articles