read() with or without select()?
Posted: Mon Jul 12, 2010 7:49 pm
Hi,
From the docs, it looks like read() blocks the task. We're having some trouble speeding up the read over serial and were wondering if sticking it inside a select() conditional would speed the whole thing up. Just intuitively, it shouldn't be faster, right? read() blocks until it sees data, which is fine for me since it's a separate task that doesn't need to run until it finds data on the port. Seems like select() would do the same thing, just tell me when there's data so I can read() it.
Is that about right?
Thanks!
Christoph
From the docs, it looks like read() blocks the task. We're having some trouble speeding up the read over serial and were wondering if sticking it inside a select() conditional would speed the whole thing up. Just intuitively, it shouldn't be faster, right? read() blocks until it sees data, which is fine for me since it's a separate task that doesn't need to run until it finds data on the port. Seems like select() would do the same thing, just tell me when there's data so I can read() it.
Is that about right?
Thanks!
Christoph