Communication between QThread and boost

Gui is in Qt

and Api is in boost

. Guy should sit on top of Api. One of the functions of the Api is to manipulate the network layer data, process the data in specific ways, and communicate with the Gui (i.e. the Gui Bridge to the other end of the Api). To avoid freezing the GUI, the Api runs in a separate thread. If both Gui and Api were using Qt, communication would be easier with signal-slot

Qt's cross-threaded mechanism . Api emits

and returns immediately and vice versa. Therefore, nobody will be blocked unless explicitly specified ( Qt::BlockingQueuedConnection

). I've boost

only been using it since it was required to code a new Api in boost

. How to achieve this mechanism in a postboost <--> Qt

? The api will be a static_library header and so the Gui and Api will create a single executable. I have to support at least Linux, Windows and Mac.

Edit: Sorry, but I already had a long discussion (to say the least) with the manual, but the net result is "have" to use boost in the Api. Infact Gui might not even use Qt. Anyone with a Gui needs to connect to our Api to communicate with the other end (like the Gui-API-core model). So suggestions for using Qt on both sides, etc. Won't have much support

+3


source to share





All Articles