Don't know if you got this link, but here's how to use non-blocking calls in C. http://beej.us/guide/bgnet/output/html/advanced.html#select
No multithreading needed.
Edit:
Select can be found in Pub.StdC as select_()
No multithreading needed.
Edit:
Select can be found in Pub.StdC as select_()