Boost logo

Boost Users :

Subject: [Boost-users] Suggestion about using Signals2
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-03-19 11:20:00


Hi,

I need some help on using signals2 in my app, I hope to explain my
problem well.

I have a thread that reads from the RS232:

void SerialPort::reading()
{
  ... read...
  if (data_available) signal_OnData;
}

the signal_OnData is:

typedef boost::signals2::signal<void ()> _signal_void;
_signal_void signal_OnData;

And I connect it to a method MyUserClass::OnDataReceived()

Into this method (MyUserClass::OnDataReceived) I need to re-send some
data to RS232, but the SerialPort::reading thread is locked because it's
waiting the OnDataReceived ends..

In fact, when the methods OnDataReceived ends, I receive data again.

How can I solve this problem?

Thanks in advance!
Daniele.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net