06-26-2013 04:31 PM
(Running on Windows XP) If I call CmtScheduleThreadPoolFunction () to start a secondary thread - say from a menu item in the main program, must I call CmtReleaseThreadPoolFunctionID() for the resulting Thread ID from the main thread also, or can I call it from the secondary thread?
Perhaps another question would be: is it better to create secondary threads as needed when the main program starts and suspend them? Or is it better to create them as needed?
06-27-2013 04:49 PM
It is recommended that you make sure to always terminate every thread other than the main thread before your program terminates.Take a look at the following:
http://zone.ni.com/reference/en-XX/help/370051V-01/cvi/uiref/cvilifetime_of_secondary_threads/
http://zone.ni.com/reference/en-XX/help/370051V-01/cvi/programmerref/monitoringsecondarythreads/