On Monday December 6 2010 08:37:39 Garth N. Wells wrote: > On 06/12/10 16:34, Johan Hake wrote: > > On Sunday December 5 2010 12:23:51 Anders Logg wrote: > >> On Sun, Dec 05, 2010 at 04:36:56PM +0000, Garth N. Wells wrote: > >>> On 05/12/10 16:31, Anders Logg wrote: > >>>> It would be good to move the id() function to the Variable class. That > >>>> way we have it for free for all classes that subclass Variable (which > >>>> are most classes). The overhead will be minimal. > >>> > >>> I'm not so sure. It needs to be used with some care in the > >>> multi-threaded case, and putting it in Variable would mean that we > >>> have to worry about thread issues for any Variable sub-class. > > > > If we make it thread safe for one case (Mesh), wont it be threadsafe for > > all other cases? > > Yes, but how can it be made thread-safe?
He, he, that is your table ;) I thought I read something in the boost::uid that it was thread safe? Johan > Garth > > > Johan > > > >> Yes, maybe. But we should at least make the id() a derived property > >> for Mesh. We can put the unique_id member variable and the id member > >> function in a separate class named "ID" (or similar). Then Mesh can > >> derive from both Variable and ID. That way, we can easily add the > >> property to other classes when we need it. > >> > >> -- > >> Anders > >> > >> _______________________________________________ > >> Mailing list: https://launchpad.net/~dolfin > >> Post to : [email protected] > >> Unsubscribe : https://launchpad.net/~dolfin > >> More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

