spark-style accumulators
Open
discussion
enhancement
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 778
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 3
Description
It would be easy to modify/derive from the existing Variables to become race-safe counters or sum objects like Sparks accumulators. The only `set` method would be on initialization, thereafter only `get` and `add`-like methods would be allowed. The latter could be made syntactically nice with in-place add.
I'm not sure how much of a demand there is for this, but it seems useful.
Note that we would probably not be able to protect against tasks that run more than once for some reason, i.e., the add method should be considered a side-effect.
Contributor guide
Assessment
This issue has not been assessed yet.