LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI Multi-threading

I'm looking at an example "OnePanel" written by NI and can't figure why anyone would want to use "CmtGetThreadLocalVar". I can use a normal locally defined variable in this example and that works fine as it should. Am I missing something? Is there a real application for this "CmtGetThreadLocalVar" routine?

See attached file....

Thanks
0 Kudos
Message 1 of 3
(3,106 Views)
Thread Local variables are variables that are globally available, but have local variable value copies. Think of it as a global variable between threads that has a unique local instance. They are uncommonly needed. Usually normal global, local and ThreadSafe variables are all that you need to use. See the document under cvi\bin\MultithreadingOverview.pdf for more information.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(3,106 Views)
Thread Local variables are variables that are globally available, but have local variable value copies. Think of it as a global variable between threads that has a unique local instance. They are uncommonly needed. Usually normal global, local and ThreadSafe variables are all that you need to use. See the document under cvi\bin\MultithreadingOverview.pdf for more information.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 3 of 3
(3,106 Views)