OCC and Boost Threading


I want to speed up out application by putting some of out OCC-calls into (boost) threads. Is there anything I have to remember? First test ended up with null pointer whenever I hit a OCC-function.


Roman Lygin's picture

Hi Markus,

As long as you don't use OCC API and objects across the threads there is nothing OCC-specific you should worry about. Except, perhaps, if you rely on OCC-specific signal-to-exception conversion activated by OSD::SetSignals().

If you are going to use OCC objects across the threads, then there is *a lot* you need to take care about. A few posts from 2009-2010 should give you a clue where to look.


(My biased opinion - consider TBB, not Boost ;-))

Hope this helps.