incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: string methods thread safety
Date Tue, 18 Jul 2006 00:48:43 GMT
Farid Zaripov wrote:
>  
[...]
>   In the test below correct output does the first thread only (prints
> "str1") and
> this result depends from OS, CPU power etc.

Okay, that's because the thr_arg array goes out of scope after
run_test returns. I agree that the thread should be able to safely
access the argument in this case. But I don't think the problem is
limited to the thread argument; it affects the thread id as well
(the address of the thread id is passed to the thread function when
the argument array is null). Let me look into changing it as well.

Thanks
Martin

Mime
View raw message