20 Mar
2009
20 Mar
'09
12:31 p.m.
Igor R ha scritto:
But another problem is raised: when I receive 2 command one after other quickly, I miss the second, so...
Is there a method to launch a signal directly into another thread? Something like:
boost::thread(boost::bind(signal_OnData, ptrToObj))
I'm not sure I understand your issue, but anyway, in such kind of task you can consider using boost.asio. Using asio::io_service::post you can conveniently post functors between different threads, without the need for explicit locking.
Hi Igor, thanks for the reply... You mean using asio::io_service::post instead of signals or using asio::serial_port instead of my serial classes? If you have a minimal code snippet I will grateful! Daniele.