-
It seems to stop and throw the error after about 7 seconds of calculating, and the line specified seems to be a random spot within the recursion block. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
This is not a bug. You are required to yield at least once every 5 seconds, or your program will be terminated. Consider inserting Tip: for future reference, you can ask programming related questions in the new Discussions page. |
Beta Was this translation helpful? Give feedback.
-
As Lem mentioned, this is intentional behaviour. We don't want badly written programs to end up using excessive resources, and so there are some requirements on how long you can execute for. Any yield ( |
Beta Was this translation helpful? Give feedback.
-
Ah, thanks for the info! One question though: Are you sure it can only draw once per tick? Because so far I've been drawing hundreds of pixels per second, not 20! |
Beta Was this translation helpful? Give feedback.
-
The monitor only refreshes once per tick, is what I meant |
Beta Was this translation helpful? Give feedback.
This is not a bug. You are required to yield at least once every 5 seconds, or your program will be terminated. Consider inserting
sleep(0)
at the end of your loop (you can only draw once per tick anyway).Tip: for future reference, you can ask programming related questions in the new Discussions page.