|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2007-07-02 15:32:22
On Mon, July 2, 2007 21:02, "JOAQUIN LOPEZ MU?Z" wrote:
> ----- Mensaje original -----
> De: Hartmut Kaiser <hartmut.kaiser_at_[hidden]>
> Fecha: Lunes, Julio 2, 2007 8:23 pm
> Asunto: Re: [Boost-users] [wave] thread safety???
> Para: boost-users_at_[hidden]
>
>>
>> Ovanes,
>>
>> > I would like to start multiple preprocessing threads. Is wave
>> > thread-safe or there some points I should take in account?
>>
>> Wave object instances are not thread safe. Wave doesn't contain
>> any thread related code at all. You'll have to protect the
>> wave object instances from thread related issues yourself.
>
> Being thread-unaware does not mean your code is thread unsafe:
> you're most likely providing the basic thread-safety guarantee
> as defined in
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2298.html
>
> as long as boost::wave::context etc. do not have class static
> data.
>
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Yes, that is exactly what I mean: reentrant member functions and no static data which can be
damaged by parallel execution of multiple context instances...
My intention is:
I have a lot of source files, which I would like to preprocess by some number of threads. Each
thread will own a dedicated context instance and preprocess the source file. Will this work, of do
you for example have some static tables or whatever, which would be written by this contexts at
the same time?
With Kind Regards,
Ovanes Markarian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net