Boost logo

Boost Users :

From: Rainer Thaden (RThaden_at_[hidden])
Date: 2008-03-26 14:08:57


Hi all,

I have a general question regarding threads and signals with boost and Qt.

I have a DLL communicating with an external device via Ethernet and a
main program with a Qt-GUI for controlling the device.
The communciation runs in a different thread than the main program.
Qt provides signal/slots across threads, but as I understand it, I have
to use the QThread library for it to work.
In the DLL I use boost signals and slots and the main program also
receives boost signals and then emits Qt's signals to update the GUI, etc.
The reason to not use Qt in the DLL was to not force other programmers
to use Qt if they want to write their own control application for the DLL.
However, I am getting in trouble with synchronization of the threads now
and the question is:
is it possible / recommended / not recommended to mix Qt's thread API
with the boost thread API?

Qt provides the possibility of "delayed" signals, that is, a posted
signal is queued into the event loop of a thread and, thus, serialized.
Is that easily possible with boost threads?

Any comments appreciated.

Best regards,

Rainer


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