update : String -> Int -> (Int, Effects String)update act m = case act of "a" -> (m + 1, Effects.batch [ "b" |> Task.succeed |> Effects.task, "c" |> Task.succeed |> Effects.task ]) -- "b", "c" -> handled here
-- others_cases -> handle async ones from GUI or server--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Btw, my guess would be "No such guarantee" -- once you are in Task-land everything is async. But since Task.succeed is documented as "a task that succeeds immediately", I was wondering if that provided some additional guarantee.
On Sunday, October 4, 2015 at 1:12:21 AM UTC-5, Desmond D'Souza wrote:Say I have an asynchronously triggered action "a" that causes 2 immediate callback actions "b" and "c" via Task.succeed, like this:update : String -> Int -> (Int, Effects String)update act m =case act of"a" -> (m + 1, Effects.batch [ "b" |> Task.succeed |> Effects.task,"c" |> Task.succeed |> Effects.task ])-- "b", "c" -> handled here
-- others_cases -> handle async ones from GUI or serverWhen the first "a" is processed, does Elm guarantee the corresponding "b" and "c" callbacks will be processed before any async other_cases like asynchronous GUI or server events that arrived while the first "a" was still being processed?If so, is this guarantee made by the language? Current implementation? Both?(If not, I will need to re-structure my design).Thanks!
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.