← Back to team overview

yade-dev team mailing list archive

Re: How to use a plugin

 

> Oh, so we should always do like you suggest when we define global
> variables if we want to maintain the parallel processing? If so, I
> would suggest to add this point to Yade documentation so that we all
> keep in mind (since parallel processing is enabled by default).

I think it is noted at few places (like modifying Body::state from Law
functors). That said, you shouldn't define globals in the first place,
since they break encapsulation of objects and can lead to unexpected
interactions. (Yade has only a few necessary globals (singletons, to be
more precise): ClassFactory, SerializableSingleton and Omega. Even scene
is not global. I wouldn't encourage that practice by documentation,
supposing that you know what you do if you use globals...

Cheers, v.








Follow ups

References