01-06-2011, 08:50 PM
In example 1, Function cannot use T, because mac creates new thread.
In example 2, Function can use T, but need to declare it there: int- T.
In both cases, it is better to pass the value as an argument, not as a thread variable. In example 2 you can even place val(_command) etc in Function, because it can use _command, because it is a thread variable.
In example 2, Function can use T, but need to declare it there: int- T.
In both cases, it is better to pass the value as an argument, not as a thread variable. In example 2 you can even place val(_command) etc in Function, because it can use _command, because it is a thread variable.
