actor-framework / actor-framework/actor-framework

`caf::flow`: backpressure, lifecycle and documentation defects

Ouverte
#2,471 0 commentaires 0 réactions 1 personne assignée Réclamée par @shariarriday Voir sur GitHub
Langage dominant
C++
Étoiles
3.4k
Forks
572
Merge moyen
3 j 14 h
PR mergées (30 j)
3

Description

## Bugs

- [ ] Make `interval::request(0)` a no-op — it arms the timer without demand and
`fire()` underflows `demand_` to `SIZE_MAX`, so the operator emits forever
(`op/interval.cpp`).
- [ ] Honour `from_external` in `stream_bridge_sub::do_dispose` — deliver
`on_error(sec::disposed)`, else `release_later()`; today the observer gets no
terminal event and is never released (`detail/stream_bridge.cpp:142`).
- [ ] Specify the `request(0)` contract on `subscription::request` and apply it
uniformly — it aborts `ucast`/`mcast` under runtime checks, underflows
`interval`, and is forwarded blindly by `zip_with`. Specify demand overflow
behavior at the same time.
- [ ] Make `zip_with` credit each input only up to `demand_ - buf.size()`
instead of forwarding the full demand to all inputs (`op/zip_with.hpp:89`).
- [ ] Document that `publish` gates upstream credit on its slowest subscriber,
and consider an opt-in overflow policy for slow subscribers
(`op/publish.hpp:143`).
- [ ] Document and test `buffer`'s deferral of terminal events while a partial
batch is pending (`op/buffer.hpp`).

## Documentation — `manual/core/DataFlows.rst`

- [ ] Specify the backpressure contract: who calls `request`, whether
`request(0)` is legal, whether demand saturates, how lossy operators spend
demand, and how `cancel` differs from an external `dispose`.
- [ ] Replace `dispose` with `cancel` in the `subscription` description.
- [ ] Correct the `merge` concurrency default — eight applies only to the
zero-argument form; the variadic form uses `sizeof...(Inputs) + 1`.
- [ ] Fix the "Prefix and Tail" section to describe `prefix_and_tail`, and note
that it emits nothing when the source ends before `n` items.
- [ ] Replace the stale names `callable_source` and `limit_step` with
`gen::from_callable` and `step::take`.
- [ ] Classify the APIs as hot, cold, connectable, single-subscribe or
replaying (`multicaster`, `from_resource`, `cache`, `publish`, `ref_count`).
- [ ] Document the surprising terminal semantics of `element_at`, `to_vector`,
`on_error_return`, `on_error_return_item` and `reduce`.
- [ ] Cover the missing APIs: the source factories, `zip_with`,
`combine_latest`, the multicasting and connectable APIs, `cache`, `single`,
`retry`, `on_error_resume_next`, the `do_on_*` hooks, the bridging and actor
integration APIs, and the steps in `flow/byte.hpp` and `flow/string.hpp`.

## Documentation — Doxygen

- [ ] Fix `from_container` and `from_callable`, which claim to emit ascending
values (`observable_builder.hpp`).
- [ ] Fix the `prediate` typo in `filter` and `take_while`
(`observable_decl.hpp`).
- [ ] Fix `generation` and `transformation`, described as blueprints for an
observer instead of an observable (`fwd.hpp`).
- [ ] Replace the copy-pasted `op::never` class comments on `op::retry` and
`op::on_backpressure_buffer`.

## Tests

- [ ] `prefix_and_tail`: what a tail subscriber sees when the prefix
subscription is disposed externally.
- [ ] Demand overflow under repeated large `request(n)`.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.