LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Another multithreading question

Why in multithreading samples all of global variables are defined
as static ?


_____________
regards
Frog
0 Kudos
Message 1 of 3
(2,867 Views)
This is done just for purity's sake and is not related to multithreading.

If you do not intend for a global variable to be used outside of the code module in which it is declared, you should declare the variable static so that the compiler does not export it from the code module. I believe that this is why the examples are written this way.
0 Kudos
Message 2 of 3
(2,867 Views)
> This is done just for purity's sake and is not related to
> multithreading.
[...]


Just wanted to be sure.
Thanks.

__________
regards
Frog
0 Kudos
Message 3 of 3
(2,867 Views)