Problème thread en release
Bonjour à tous,
J'initialise mon application de cette manière :
Code:
boost::thread myThread(boost::bind(&MyClass::MyFunction, this, param1, param2));
En debug, pas de problème, mais en release, je me retrouve avec une erreur ici, dans boost\thread\detail\thread.hpp :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| template<typename F>
class thread_data:
public detail::thread_data_base
{
public:
#ifndef BOOST_NO_RVALUE_REFERENCES
thread_data(F&& f_):
f(static_cast<F&&>(f_))
{}
thread_data(F& f_):
f(f_)
{}
#else
thread_data(F f_):
f(f_)
{}
thread_data(detail::thread_move_t<F> f_):
f(f_)
{}
#endif
void run()
{
f(); <-- ici
}
private:
F f;
void operator=(thread_data&);
thread_data(thread_data&);
}; |
Et le "this" est à nul
Etant en release, il est difficile de savoir ce qui se passe en interne..
En débug, je suis en /MDd et en release /MD
Quelqu'un pourrait-il m'aider ?
Merci beaucoup,
A bientôt