Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

Labwindows is not creating new thread from default thread pool instead waits for the the existing thread to be available

$
0
0

My current application performs all the UI tasks in main thread and I am trying to create a separate thread for each module (temperature, encoders and force module) using CmtScheduleThreadPoolFunctionAdv   from default thread pool. However I noticed lab windows is creating only one thread for all the three calls. Also it is waiting for the secondary thread it created to be available to process all the modules.

 

CmtScheduleThreadPoolFunctionAdv (
                        DEFAULT_THREAD_POOL_HANDLE, DAQTempThreadFunction, &temperatureParams,
                        THREAD_PRIORITY_NORMAL, NULL, 0, NULL, 0,
                &daqTempThreadFunctionID);

 

CmtScheduleThreadPoolFunctionAdv (
                        DEFAULT_THREAD_POOL_HANDLE, DAQEncThreadFunction, &encoderParams,
                        THREAD_PRIORITY_NORMAL, NULL, 0, NULL, 0,
                &encThreadFunctionID);

 

CmtScheduleThreadPoolFunctionAdv (
                         DEFAULT_THREAD_POOL_HANDLE, DAQPressureThreadFunction, &pressureParams,
                         THREAD_PRIORITY_NORMAL, NULL, 0, NULL, 0,
                 &pressureThreadFunctionID);


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>