You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -368,10 +368,9 @@ const tasks = {
368
368
369
369
## Re-using ports
370
370
371
-
Each `send` and `receive` port pair only support **one**`ConcurrentTask.Pool` subscribed at a time.
372
-
**Weird** things can happen if you have **two or more**`ConcurrentTask.Pool`s using the same ports at the same time.
371
+
For most cases a single `ConcurrentTask.Pool` is paired a `send` and `receive` port pair.
373
372
374
-
Generally this should not be needed, but if you have a use-case, please leave an [issue](https://github.com/andrewMacmurray/elm-concurrent-task/issues).
373
+
If you need multiple `Pool`s subscribed to a port pair at the same time or need to continually instantiate new `Pool`s (e.g. switching between pages), make sure each pool has a unique id with `ConcurrentTask.withPoolId`. Otherwise `Pool`s may receive results for other pools which can lead to some confusing states!
0 commit comments