LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Locks in LabWindows.

I was wondering if LabWindows has standard Locks, Mutexes, etc? Searching the help contents the only
locks I could find were vilock and viunlock which were explicitly for ViSessions.
0 Kudos
Message 1 of 3
(3,363 Views)
Locks are used for synchronization in multi-threaded applications, as you probably know. CVI has locks in the multithreading section of the Utility library. First, there are thread locks, that are very similary to critical sections or mutexes in C/C++. Also, there are several objects that have built in locking/synchronization. These object are the thread safe queue, which is a dynamic data buffer that can be used to share arrays of data between threads, the thread safe variable, which is a variable with built in locking through Get and Release accessor functions, and thread locals.

Consult the help for CVI Multithreading for more information. There is also a good tutorial on threading and synchronization with CVI in the cvi\bin directory called MultithreadingOverview.pdf.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(3,354 Views)
Spend some time but make sure to run ALL the available multi thread examples which stay in the cvi/samples/utility/threading directory.
Regards, Philippe proud to be using LabWindows since version 1.2
// --------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 3
(3,343 Views)