|
Boost : |
Subject: Re: [boost] [thread] #2739 shouldn't at_thread_exit work on themainthread?
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-05-31 12:43:12
----- Original Message -----
From: "Larry Evans" <cppljevans_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, May 31, 2009 5:40 PM
Subject: Re: [boost] [thread] #2739 shouldn't at_thread_exit work on themainthread?
> On 05/31/09 07:39, vicente.botet wrote:
> [snip]
>>
>> As I said in another post, the patch is not correct. So please do not apply it.
>
> I must have overlooked that post ;(
>
>> The test case is not currently neither good because the test succeeds even if mycallable2() is not called . In order to test this the operator()() should contains an abort when the called.
>>
>> struct mycallable2
>> {
>> void operator()() const {
>> mycallable2_called=true;
>> std::cout << "mycallable2" << std::endl;
>> ***** abort()
>> };
>> };
>>
>>
>> And the Jamfile should the contain
>>
>> rule thread-run-fail ( sources )
>> {
>> return
>> [ run-fail $(sources) ../build//boost_thread ]
>> [ run-fail $(sources) ../src/tss_null.cpp ../build//boost_thread/<link>static
>> : : : : $(sources[1]:B)_lib ]
>> ;
>> }
>>
>> test-suite "threads"
>> : [ thread-run-fail test_ticket_2739.cpp ]
>> ;
>>
>> Whithout these modification you can inspect the .output file on the bin.v2 directory and see if the trace "mycallable2" appears.
>> Could you run the test case without applying the patch and send the output?
>>
> OK, I tried it by first rm'ing th patched thread.cpp, then doing svn
> update for whole trunk. Then did bjam in test_patches.
>
> This is all shown in attachment.
>
>
Thanks Larry for the informations. The fact the program fails let me think that in your platform the bug is not present, as the function is called. To be sure you can remove the abort and check that the file test_ticket_2739.output in the directory bin.v2/libs/thread/test_tickets/test_ticket_2739/ ... contains the line "mycallable2".
On which platform are you testing? with which standard Clib?
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk