Skip to content

docs: address the remaining mailing-list review feedback #353

Closed

Description

@sgerbino

From the review result:

Corosio: address the documentation comments in this review: https://lists.boost.org/archives/list/boost%40lists.boost.org/message/KHNY67ZNXFWT54EIWDOJPHN4KO6KJLN4

Source: Boost review result (conditional acceptance), Boost mailing list, September 2026. The linked message is "Some thoughts on Corosio" (July 2026).

Items from that message not already tracked in #324:

  • Dark mode: black text on dark-blue background is hard to read
  • UDP tutorial understates IP fragmentation: fragmented datagrams may be silently discarded (IPv4 practical limit as low as 576 bytes), so oversized datagrams are a correctness hazard, not just a performance note
  • Doc examples pervasively pass coroutine arguments by reference/string_view; establish and apply a safe-arguments convention for examples
  • "Opening and Closing TCP Connections" draws the branching TCP close sequence as a linear list
  • Document executor affinity (class-level thread safety is documented; affinity is not)
  • Document the rationale for io_context combining I/O waiting with coroutine execution
  • Hash Server tutorial: compute_fnv1a should be a plain function, not a coroutine

Activity

  1. moved this from Backlog to Ready in Beast2on Sep 8, 2026
  2. TheLingeringWill commented on Nov 4, 2026

    @TheLingeringWill
    Contributor

    I’d like to work on this, happy to take it. (Can’t be assigned yet since I’m not in the org.)

  3. moved this from Ready to In progress in Beast2on Nov 4, 2026
  4. TheLingeringWill commented on Nov 4, 2026

    @TheLingeringWill
    Contributor

    @sgerbino About this item:

    Hash Server tutorial: compute_fnv1a should be a plain function, not a coroutine

    capy::run(ex)(...) only accepts a task, so to run the hash on the thread pool something still has to be a coroutine. I see two ways to make compute_fnv1a a plain function in hash_server.cpp:

    1. A thin named wrapper:
    std::uint64_t
    compute_fnv1a(char const* data, std::size_t len);   // plain
    
    capy::task<std::uint64_t>
    hash_task(char const* data, std::size_t len)
    {
        co_return compute_fnv1a(data, len);
    }
    
    // in do_session
    auto hash = co_await capy::run(pool.get_executor())(hash_task(buf, n));
    1. A coroutine lambda inside do_session, the same pattern capy uses in test/unit/ex/run.cpp:
    auto hash = co_await capy::run(pool.get_executor())(
        [](char const* data, std::size_t len) -> capy::task<std::uint64_t> {
            co_return compute_fnv1a(data, len);
        }(buf, n));

    I lean towards 2, which is the "extra lambda" the review mentions: it keeps a single reusable plain function and shows the executor switch at the call site. The arguments are passed as parameters rather than captured, in line with the review's point about references in coroutines; data stays valid because do_session is suspended until the hash completes. Which do you prefer?

  5. moved this from In progress to In review in Beast2on Nov 5, 2026
  6. 12 remaining items

  7. sgerbino commented on Nov 9, 2026

    @sgerbino
    CollaboratorAuthor

    Resolved by #412

  8. moved this from In review to Done in Beast2on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions