From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does Labview manage Threads

Hello,

 

I'm using LV 8.5 on win32.

I'm working on a VI that loads a specific DLL with a CNI and I'm logging the dllMain function. I can see that labview starts a random number of threads every minuts, restart them, and I can't undertand why. At each new thread, my DLL is attached to it, and the dllmain function called.

 

This function initialize some stuff and I have to know if it's possible to predict labview's thread comportment.

 

My VI only contains CNI linked by a path and error clusterwire.

 

 

Thank you for your help

Maxime

0 Kudos
Message 1 of 3
(2,373 Views)

Hello Maxime,

you can find detailed information in the LabVIEW help.
Please search for the topic “Multitasking, Multithreading, and Multiprocessing”

 

For additional Information, please check the following knowledge-bases 

How Many Threads Does LabVIEW Allocate?
http://digital.ni.com/public.nsf/allkb/84ECA015AA496B23862565BC006C0F19?OpenDocument

Is There a Limit to the Number of Threads I Can Allocate in LabVIEW?
http://digital.ni.com/public.nsf/allkb/37675EB478666A5E862565BC006BDCDB?OpenDocument

Regards
Ulrich
AE NI-CER

0 Kudos
Message 2 of 3
(2,293 Views)

Technically speaking, LabVIEW does not manage the threads. LV creates the threads for each independant code segment and let the Operating System manage threads just like it does for every other application.

 

Trivia

 

Check the config of your dll call. They default to running in the UI threads unless you indicate otherwise.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,280 Views)