21 May 15:46
Re: [thread] test_lock* and test_move* failures on trunk
From: Anthony Williams <anthony.ajw <at> gmail.com>
Subject: Re: [thread] test_lock* and test_move* failures on trunk
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-21 13:46:52 GMT
Subject: Re: [thread] test_lock* and test_move* failures on trunk
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-21 13:46:52 GMT
"Peter Dimov" <pdimov <at> pdimov.com> writes:
> Markus Schöpflin:
>> Anthony Williams wrote:
>>
>>> Could you try adding the following overload of the thread constructor
>>> to boost/thread/pthread/thread.hpp
>>>
>>> template <class T,class R,class P1,class A1>
>>> thread(R (T::*f)(P1),A1 a1):
>>>
>>> thread_info(make_thread_info(boost::bind<void>(boost::mem_fn(f),a1)))
>>> {
>>> start_thread();
>>> }
>>>
>>> If that makes the problem go away, I'll commit the change.
>>
>> I tried, but the compiler prefers the other constructor when resolving the
>> overload, so the error persists.
>
> Try
>
> template <class T, class R, class A1>
> thread(R (T::*f)(),A1 a1):
>
> without the P1.
Oops. I was too quick off the mark, and forgot that the first argument
was the "this" pointer.
> This would only work for no-argument non-const member
> functions though. More overloads are needed to cover all cases. I'll think
> about fixing that somehow on the bind side.
Shall I hold off committing a fix to boost::thread for now, then?
> A more systematic thread::thread
> test that covers all possibilities would be nice to have.
I've updates test_thread_launching to cover more options
Anthony
--
--
Anthony Williams | Just Software Solutions Ltd
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed