in reply to Re^2: What is a shared variable?
in thread What is a shared variable?

Shared variables are implemented using a system similar to tying. In each thread there is a lightweight object which when accessed, sets a lock then sets or retrieves the value stored in the "real" variable of which there is one shared across all threads. Depending on the usage, one or more threads may have a current or stale copy of the variable's value cached.

If you shared an array of strings instead, you'd see less usage with shared array, since only one element of the array might be cached at any one time.

Dave