From: Thomas Sondergaard (ts_news1_at_[hidden])
Date: 2007-04-30 03:28:18
Vadim Lebedev wrote:
> Raymond Haeb wrote:
>> Vadim Lebedev schrieb:
>>> I'm working on a project using QT and boost and we have a requirements
>>> that certains signals should be handled inside main QT thread but raised
>>> in another thread.
>> Why don't you use QThread? It hast this functionality
>> (since QT 4.0 (iirc)).
> The components declaring sugnals, have a requirement not to use QT...
> They should be portable to the
> plateforms where QT is not available.
The main thread in all the gui toolkits I'm familiar with is running an
event-loop. The standard way of having work done in this thread is to
send it events. As I see it your signal-framework needs to wrap a
toolkit specific way of transporting your signal as an event. In Qt-4
that is directly supported by Qt's signal-slot framework. In Qt-3 you
have to use QApplication::postEvent() (only thread-safe method, as far
as I recall) and send a QCustomEvent-specialization to some dispatcher
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk