LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Async timer with priority threads

Hi,

I am new to LabWindows/CVI, so bare with me Smiley Happy

 

I was looking at NewAsyncTimers and looked through some previous topics which all state that the async timer callbacks are all executed on the same thread, with the priority of that thread set to THREAD_PRIORITY_HIGHEST.

Does this also apply to NewAsyncTimersWithPriority? Suppose I start multiple async timers with this, and set each timer to a different priority, do they all still run on the same thread?

 

Thanks in advance Smiley Wink

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

According to the following manual, all asynchronous callback functions share a common thread.

 

NewAsyncTimerWithPriority

http://zone.ni.com/reference/en-XX/help/370051V-01/toolslib/functionreference/cvinewasynctimerwithpr...

 

 

Maggie M.
Application Engineer
National Instruments.
http://www.ni.com/support
Message 2 of 4
(2,926 Views)

Thanks Maggie, now as a follow up to that, how are the varying priorities implemented within a single thread?

0 Kudos
Message 3 of 4
(2,922 Views)

There are two conflicting aspects in this command :

  1. The command is available only in real-time operating systems, and
  2. On Windows all async timres share a common thread

I don't know has they are implemented in a RT OS, but I see no reason why they couldn't be running in separate threads, each with its own priority. But in any case they cannot be used on Windows. 



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?
Message 4 of 4
(2,917 Views)