Boost.Thread threads not starting on the iPhone/iPad in release builds

后端 未结 1 573
自闭症患者
自闭症患者 2021-01-15 03:46

We\'re writing an iPad app with quite a lot of background processing all of which is written in a set of C++ libraries. These libraries work fine on Linux, Mac and Windows b

相关标签:
1条回答
  • 2021-01-15 04:44

    We've now worked this out. The problem is in the build options, and the clue is that it is the spin locks that are failing.

    It turns out that there is an ARM implementation of the spin lock which is used in non-thumb builds. Because of the way that the thumb builds are done it is very easy to mix thumb and non-thumb builds (i.e., build Boost without thumb and have xCode build with thumb). This is what we were doing, and this means that the spin lock will never get signalled and will just block forever.

    So, to solve this, make sure that you are using the same thumb build options for all of your libraries!

    This thread discusses the problem: http://groups.google.com/group/boost-list/browse_thread/thread/7dc1e80659182ab3

    0 讨论(0)
提交回复
热议问题