Boost logo

Boost Users :

Subject: [Boost-users] threading/io service query
From: Sean Farrow (sean.farrow_at_[hidden])
Date: 2011-06-28 13:40:37

Hi Fokes:
I'm currently working on a piece of software that is using or going to use boost. There are two classes that use the boost threading components:
The first MidiWidget allows the opening of midi input/output ports, I plan to associate two threads, one to receive data and one to output the data. The second is where the problem could occur, MidiSurface simulates a midi control surface, which processes midi messages. Given that there could be multiple surfaces in the program-determined by connections to the pc, and that each surface may need to process a different set of messages which are defined in an xml file, what do people consider is the best approach to firing up a thread when ever a surface is created. I'd ideally like each surfaces thread be able to examine the data contained within it's owning surface without copying the whole class. Is it better to have the thread function as a virtual function in the surface class or a separate function that takes the surface, or a reference to the surface as a parameter.
Also I've got a thread safe queue, but was wondering whether there is now one included with boost-or tr1. I'm using boost 1.46.1 and visual studio 2010 sp1 with the latest windows sdk.
Any help/thoughts appreciateds.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at