Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using mac as a function - returning variables
#2
mac "UpperCaseFunc" "" &Test

But it is unsafe if Test is a local or thread variable (not global). If the first thread ends before the second thread accesses the variable, the second thread actually accesses invalid memory location where the variable was, and then exception or memory corruption. Therefore better use global variables.

Quote:Also if in a function I call several other functions as mac, will they not each run in a separate thread (several at a time) or only one at a time?
each run in a separate thread (several at a time).


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)