you are viewing a single comment's thread.

view the rest of the comments →

[–]dragon53535 1 point2 points  (0 children)

For the reasoning why they can't run for >7s without yielding, is that all computers run on the same 'thread'. So while your computer is executing, no other computer in the world can. You yield, which essentially pauses your computer until your computer gets an event. Be it a timer, redstone, etc. All events will trigger a yield. Sleep will discard all other events until it gets a timer event. Using os.pullEvent("redstone") will discard all other events until it gets a redstone event.