LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to kill a thread pool function ?

Hi,

I am using LabWindows/CVI and I would like to know what is the function that would permit me to kill a thread pool function even if it didn't have time to finish.

Thanks,

JP
0 Kudos
Message 1 of 2
(3,063 Views)
Killing threads is highly unadvised. Because you the thread is executing independently, you don't know what is currently happening in the thread, so you could easily cause problems such as memory leaks or hardware access lockout due to abnormal termination of the thread.

With that word of warning, you can do it. You would use the CmtTerminateThreadPoolThread function in the Utility library. See the help for this function for more info regarding the use of this function.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(3,063 Views)