On Wed, 22 Mar 2000, Dan Sugalski wrote: > >My current understanding is that in a threaded program all code that > >accesses global data need to use some kind of explicit locking. Thus, any > >module that accesses global data of any kind is not thread safe and needs > >modification to be thread safe. Is this accurate? > > Yup, that's accurate. Global data, in this case, isn't just package > variables, but any variable that might be visible, including lexicals and > things inside objects and such. So, essentially, "testing" for thread safety boils down to a process of visual inspection. Correct? As far as figuring out what's safe and what's not, could you explain how lexicals can be unsafe? Are there global variables that *are* safe, like $_ and @_ for example, or are they all in need of locks? RTFM? Which one? -samThread Previous | Thread Next