Public service announcement: steps running in parallel should not be reading, much less modifying, any state directly observable outside those steps. Anything like that needs to happen via tasks.
-
-
Good question. The mental model is that it's possible to run every parallel section in its own thread. Access to shared state (e.g. `settledFetches` and `immediateFailure`) should be serialized via tasks. In this case, atomic increment is probably enough, though...
-
And in particular, the observable behavior assuming the increments are atomic is no different from the case when tasks are used. Since nothing outside this algorithm can observe the state, I think it's OK.
- Još 2 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.