-
- Downloads
client: Clean up implementation of Pause action and fix double wait
* js/src/main/scala/cs214/webapp/client/StateMachineClientApp.scala:
(processing):
New Boolean indicating that an event loop is running.
(timeout, setCooldown, tryProcessNextAction):
Remove.
(processActions):
New function: start an event loop, setting `processing` to `true` while
traversing `actionsQueue`. Recurse through a future to allow individual
actions to delay the next iteration of the event loop.
(processAction):
Return a `Future` to let individual actions handle timeouts.
(after):
New function: Expose `setTimeout` as a Future.
Reported-by:
Simon Lefort <androz2091@gmail.com>
parent
8970451f
No related branches found
No related tags found
Loading
Please register or sign in to comment