05-14-2010 03:59 AM
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
05-25-2010 06:54 AM
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
05-25-2010 07:28 AM
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