12 posts
Location
A place
Posted 04 July 2015 - 06:16 AM
I need to use rednet.receive() often with a "while true do" loop and then do things with the data I receive. The receiving data may come in very often, would I need to worry about a delay while I use the received data and missing a transmission?
957 posts
Location
Web Development
Posted 04 July 2015 - 07:20 AM
No, when a computer starts executing code, other computers can't run code until it yields, that is, calls 'os.pullEvent()'
Usually this isn't noticeable, since most programs don't run for more than a half a second, and those that run for too long are stopped automatically (Too long without yielding error)
Edited on 04 July 2015 - 05:47 AM
1140 posts
Location
Kaunas, Lithuania
Posted 04 July 2015 - 08:04 AM
What you should avoid is yielding inside the script. This includes any function which waits, like sleep and read.
957 posts
Location
Web Development
Posted 04 July 2015 - 08:08 AM
What you should avoid is yielding inside the script. This includes any function which waits, like sleep and read.
So in other words, don't yield unless its waiting for a message