LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using GetUserEvent within a thread

Is it possible to use the GetUserEvent function within a thread? I'm performing some measurements within a thread and logging them and using the GetUserEvent to continue testing when a failure is encountered; however it is not responding to the panel events. Thanks... 
0 Kudos
Message 1 of 2
(3,013 Views)
User events are thread-specific: they are sent in the thread that creates the panel, which means that you have to call GetUserEvent / RunUserInteface / ProcessSystemEvents in that same thread. If you call GetUserEvent in your secondary thread, that will only dispatch events that are queued for the secondary thread (probably, none).
 
The question is, what is the main thread doing while the secondary thread is performing the measurements? It is in the main thread that you have to manage the events.
 
Luis
0 Kudos
Message 2 of 2
(3,005 Views)