Forums > Dev

qelem_front for minimal latency?

August 21, 2010 | 10:56 pm

Hi, I am reading a serial port and using the data to update the outlets of my external.

Would qelem_front be the fastest, most correct way to get this data out the outlets of my external, or is that bad practice? I noticed if I use qelem_set, there is a noticeable delay from the time the data is received to the time the outlet is hit.

I am of course assuming that I can’t trigger the outlet directly from another thread (the serial port thread).

Thanks,
Dan


August 24, 2010 | 7:58 pm

qelem_front has the potential to reverse order if you push more than one event per queue service, and can starev other qelem tasks if you are calling it too often, so I wouldn’t recommend it. You might want to look at using scheduler clocks rather than low priority qelems.

-Joshua


August 26, 2010 | 9:08 am

Would I just schedule a clock with 0 delay then?


August 26, 2010 | 10:40 am

Also, I only have a single qelem, so I don’t really have to worry about the order problem.


August 26, 2010 | 5:24 pm

Yes. Schedule a clock with delay 0.


Viewing 5 posts - 1 through 5 (of 5 total)