dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #15930
Re: Data and thread safety
On Monday 05 October 2009 11:21:34 Anders Logg wrote:
> On Mon, Oct 05, 2009 at 09:33:48AM +0200, Johan Hake wrote:
> > Hello!
> >
> > The one reason (as I can recall) to include the Data class, for passing
> > of information to the former Function::eval method, was for future thread
> > safety.
>
> I don't remember but that may be one of the reasons. There were others.
Ok.
> > Previously we stored the Cell, and some other stuff, as a public
> > accessible member, before we called eval during assemble. This was not
> > thread safe. Instead we agreed on passing this data as argument, making
> > it more thread safe.
> >
> > This might not be a big issue if we, when we implement support for
> > threads (whenever this happens...) let the local Data object be stored in
> > an indexed std::vector, and then keep the present eval interface.
>
> Sounds like it could work, but we'll see when get to that point. It
> doesn't matter for the current parallel implementation.
Ok.
Johan
Follow ups
References