Verified Commit 3862be64 authored by Camil Staps's avatar Camil Staps 🚀

Spawn tasks in parallel from TCP rx loop

parent 4a849456
......@@ -179,7 +179,7 @@ where
[ OnValue (ifValue (any (not o isEmpty) o 'Data.Map'.elems) return)
] >>- \rx ->
set (const [] <$> rx) tcpRx >-| // TODO: atomic access; iTasks-SDK#370
sequence [handle processId msg \\ (processId,msgs) <- 'Data.Map'.toList rx, msg <- msgs] >-|
sequence [handle processId msg \\ (processId,msgs) <- 'Data.Map'.toList rx, msg <- msgs] ||-
loop pie
where
tcpRx = mapReadWrite (\s -> s.tcpRx, \rx s -> Just {s & tcpRx=rx}) Nothing tcpShare
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment