316326 (2) [Avatar] Offline
In code like listing 6.14, the idea is to disable and "grey-out" a button to prevent it from being clicked again (in the specific example, once the counter in state.sliderValue has reached its limit). Is it possible for the user to cause an extra click event "while the button is being greyed out"? For example, could two clicks be put "in the queue" before the disable occurs? Could a "click" be put into the queue before the "async rendering" is complete?

I've put things in quotes because I suspect I'm not using exactly the right words.
For example, if one defines a race condition as a bad thing that happens when threads don't quite cooperate, then by definition a single-threaded environment does not have race conditions.

Nevertheless, is it theoretically possible for the code to see one-too-many (or more) clicks because the system can queue additional clicks before the button is actually disabled?

Thank you in advance.

Also, very nice book. Thanks!