ogre
ogre copied to clipboard
[OGRE-152] TBB threading in an existing TBB application
[reporter="nodrev", created="Mon, 25 Feb 2013 18:34:38 +0100"]
When compiled using TBB, Ogre's assume the initialization of the library. But in my case (and I think it's the case for anyone who uses Ogre & TBB), TBB is already initialized by the main application that olds Ogre. So there's a crash when Ogre tries to initialize TBB a second time.
This patch adds an entry to cmake, 'tbb_ext', to tell ogre to not initializing tbb.
There's a problem with this patch if TBB was not initialized with the default number of threads (the THREAD_CONCURRENCY define do not match), but to support this case more modifications to WorkQueue should be done (and maybe also add a "number of working threads" to Ogre's Root constructor to replace the THREAD_CONCURRENCY define).
Note that SampleBrowser had been modified to simulate external TBB initialization.
[author="masterfalcon", created="Thu, 13 Jun 2013 08:33:02 +0200"]
See pull request #105