Thanks. I just was not sure what happened when two threads ran the function simultaneously.
------------------
Announcement
Collapse
No announcement yet.
Threads and Local Variables
Collapse
X
-
Brent,
When you use a LOCAL variable, it is allocated in a section of memory called
the stack. This allocation takes place as the function/sub is called and it
is deleted when the function/sub is finished so it simply does not exist
anywhere else when the function/sub is not running.
If you need to have a value that is available across diferent functions, use
a GLOBAL variable that can be "seen" from diferent aprts of your code.
Regards,
[email protected]
------------------
Leave a comment:
-
Yes.
------------------
Perfect Sync: Perfect Sync Development Tools
Email: mailto:[email protected][email protected]</A>
Leave a comment:
-
Threads and Local Variables
If I have two threads running the same function are local variables with the function private for each thread?Tags: None
Leave a comment: