I got this problem:
I need to preserve the value of a variable between the executions of the same function. I know this can be done with the "static" keyword. But the problem is that this function is called by different threads. In this case the use of the keyword "static" implies that the variable will be the same in all the different threads, and one change made by one of the threads will affect the valued stored by the other threads.
How can i solve this problem ???
Tanx in advance...
I need to preserve the value of a variable between the executions of the same function. I know this can be done with the "static" keyword. But the problem is that this function is called by different threads. In this case the use of the keyword "static" implies that the variable will be the same in all the different threads, and one change made by one of the threads will affect the valued stored by the other threads.
How can i solve this problem ???
Tanx in advance...