LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

thread callbacks across thread pools

Correct me if I'm wrong, but apparently calls such as PostDeferredCallToThread() don't work between thread pools. If I create a thread pool in a main program (operating in the default thread pool) and make threads, I can't make calls to callbacks in the new thread pool. Thread-safe queues and variables, on the other hand, still seem to work.

0 Kudos
Message 1 of 3
(4,072 Views)

Hi pblase

 

Unlike PostDeferredCall(), which always post the call in the main thread, with PostDeferredCalltoThread() you can specify the thread in which to call the callback, not only from the main thread pool.

 

You can use CmtGetCurrentThrreadID() to specify in which thread you want to call the callback.

 

Regards

Chris S.
0 Kudos
Message 2 of 3
(3,969 Views)

See the example in my answer to your other thread.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 3
(3,936 Views)