NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Stop Thread

Hello, I am facing a question. In a thread, the callbackfunction was executed repeatly, But I want it to be done only once. How to stop it when it call the callbackfunction first time? This is my program. void CVICALLBACK Adjustment (int menuBar, int menuItem, void *callbackData,int panel) { int threadID2=1; startflag2=1; CmtScheduleThreadPoolFunction(DEFAULT_THREAD_POOL_HANDLE,ThreadFunction2,threadfunctiondata,&threadID2); } int CVICALLBACK ThreadFunction2(void *functiondata) { int i,j; while(startflag2==1) { for(i=0;i<10;i++) for(j=0;j
0 Kudos
Message 1 of 2
(3,029 Views)

I think you should post this on the CVI forum.

 

0 Kudos
Message 2 of 2
(2,876 Views)