Skip to content
Snippets Groups Projects
Commit 3e0dd930 authored by Clément Pit-Claudel's avatar Clément Pit-Claudel
Browse files

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: default avatarSimon Lefort <androz2091@gmail.com>
parent 8970451f
No related branches found
No related tags found
1 merge request!22client: Clean up implementation of Pause action and fix double wait
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment