LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connectivity: thread-safe functions

Solved!
Go to solution

I am reading LabVIEW Connectivity course, where it states the differences between thread-safe and thread-unsafe functions. As I know, it is recommended to use thread-unsafe functions in UI Thread. Please tell me if I'm right and why shouldn't run the in any thread.

Best Regards

Edgar

0 Kudos
Message 1 of 2
(2,470 Views)
Solution
Accepted by topic author edgarvardanyan1999

Thread unsafe functions are not made to be ran by multiple threads at the same time.  This can due to many reasons, most commonly because of stored memory in the dll could be corrupted by multiple threads reading and writing from/to it.  Therefore, you force the functions to run synchronously by making them run in a dedicated thread.  The UI thread is the easiest one to do this with.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,447 Views)