infinite loop with 'forever' block
Closed this issue · 2 comments
carlkma commented
Good news: every block is now functional!
Bad news, the forever block, which is essentially while True:
, is also "functional"
- if not paired with an appropriate 'stop all' block (or
break
), the program goes on an infinite loop
carlkma commented
same thing happens when we input an always-false condition for the 'repeat-until' block
MajeedKazemi commented
a few suggestions for this:
1. use a `setInterval` timer to execute the code inside the forever block
every 100ms to make it less resource intensive.
2. the "run" button should turn into "stop" when clicked and still execute
the user's code. the forever block could include a code that would break
the while True loop when the stop button is clicked.
…On Fri, Jun 24, 2022 at 4:04 PM Carl Ma ***@***.***> wrote:
Good news: every block is now functional!
Bad news, the forever block, which is essentially while True:, is also
"functional"
- if not paired with an appropriate 'stop all' block (or break), the
program goes on an infinite loop
—
Reply to this email directly, view it on GitHub
<#9>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANTKRUSUMF2LZDJTF6YUWZ3VQYIDPANCNFSM5ZY3MSSQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>