Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be great if in-progress effects could be restarted #1

Open
ccapndave opened this issue Apr 7, 2016 · 0 comments
Open

It would be great if in-progress effects could be restarted #1

ccapndave opened this issue Apr 7, 2016 · 0 comments

Comments

@ccapndave
Copy link
Owner

Specifically in my app I have a stopwatch running, which works by having a constantly ticking:

{-| An effect that triggers TimerTick after 1 second
-}
tickSecond : Effects Action
tickSecond =
  Task.sleep 1000
    `Task.andThen` (always <| Task.succeed TimerTick)
    |> Effects.task

Obviously since elm-hot-reload just replaces the model, this task doesn't get restarted. It would be nice if we could somehow track in-progress effects that haven't yet completed, and restart them at the same time as reloading the state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant