This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
"NORMALLY THREADS OPERATE ON THEIR OWN COPIES OF INSTANCE VARIABLES, NOT ORIGINALS" Is this TRUE or FAlSE? I understand that threads share the same data space and hence tehy are light weight. Please explain
Each thread has a working memory, in which it may keep copies of the values of variables from the main memory that is shared between all threads. To access a shared variable, a thread usually first obtains a lock and flushes its working memory. This guarantees that shared values will thereafter be loaded from the shared main memory to the threads working memory. When a thread unlocks a lock it guarantees the values it holds in its working memory will be written back to the main memory.
Does anybody know a reason for not saying the same about static fields? [ July 01, 2002: Message edited by: Jose Botella ]