Three ways of handling user input
dubroy.com
Three ways of handling user input
1–10 of 17 posts
Re: Three ways of handling user input
#2Re: Three ways of handling user input
#3I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.
Re: Three ways of handling user input
#4Does anyone else find approach #3 to be wildly unintuitive? Like how does an infinite loop terminate? There's a lot of magic going on. I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.
Re: Three ways of handling user input
#5Does anyone else find approach #3 to be wildly unintuitive? Like how does an infinite loop terminate? There's a lot of magic going on. I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.
Re: Three ways of handling user input
#6Does anyone else find approach #3 to be wildly unintuitive? Like how does an infinite loop terminate? There's a lot of magic going on. I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.
Its not that unintuitive once you understand async/await and how the tasks are resumed. Execution is yielded at an await. At that time the loop is not running anywhere, its not even in a sleep state. The loop "terminates" by never being resumed.
Re: Three ways of handling user input
#7Does anyone else find approach #3 to be wildly unintuitive? Like how does an infinite loop terminate? There's a lot of magic going on. I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.
Re: Three ways of handling user input
#8Re: Three ways of handling user input
#9Does anyone else find approach #3 to be wildly unintuitive? Like how does an infinite loop terminate? There's a lot of magic going on. I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.
Its not that unintuitive once you understand async/await and how the tasks are resumed. Execution is yielded at an await. At that time the loop is not running anywhere, its not even in a sleep state. The loop "terminates" by never being resumed.
Re: Three ways of handling user input
#10Does anyone else find approach #3 to be wildly unintuitive? Like how does an infinite loop terminate? There's a lot of magic going on. I like approach #1 the best. Sure, there are some bugs, but a state diagram would help make it clearer instead of introducing magic.