From ae7181c8399ec7c18b91889d79292cb37a08050f Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Wed, 17 Jun 2026 16:08:32 +0200 Subject: [PATCH 1/2] feat(signal_set): add constructors from executor Mirror the executor-construction pattern used by tcp_socket and tcp_acceptor: add a bare signal_set(Ex const&) constructor plus an executor variant of the variadic signals constructor, each delegating to the executor's context. Add tests covering both new constructors. --- include/boost/corosio/signal_set.hpp | 31 ++++++++++++++++++++++++++++ test/unit/signal_set.cpp | 18 ++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/include/boost/corosio/signal_set.hpp b/include/boost/corosio/signal_set.hpp index 7a412f89e..d6458d52f 100644 --- a/include/boost/corosio/signal_set.hpp +++ b/include/boost/corosio/signal_set.hpp @@ -18,6 +18,7 @@ #include #include +#include /* Signal Set Public API @@ -224,6 +225,36 @@ class BOOST_COROSIO_DECL signal_set : public io_signal_set (check(add(signals)), ...); } + /** Construct an empty signal set from an executor. + + The signal set is associated with the executor's context. + + @param ex The executor whose context will own this signal set. + */ + template + requires(!std::same_as, signal_set>) && + capy::Executor + explicit signal_set(Ex const& ex) : signal_set(ex.context()) + { + } + + /** Construct a signal set with initial signals from an executor. + + The signal set is associated with the executor's context. + + @param ex The executor whose context will own this signal set. + @param signal First signal number to add. + @param signals Additional signal numbers to add. + + @throws std::system_error Thrown on failure. + */ + template... Signals> + requires capy::Executor + signal_set(Ex const& ex, int signal, Signals... signals) + : signal_set(ex.context(), signal, signals...) + { + } + /** Move constructor. Transfers ownership of the signal set resources. diff --git a/test/unit/signal_set.cpp b/test/unit/signal_set.cpp index ea8ed9ac6..23f8782e2 100644 --- a/test/unit/signal_set.cpp +++ b/test/unit/signal_set.cpp @@ -67,6 +67,22 @@ struct signal_set_test BOOST_TEST_PASS(); } + void testConstructFromExecutor() + { + io_context ioc(Backend); + signal_set s(ioc.get_executor()); + + BOOST_TEST_PASS(); + } + + void testConstructFromExecutorWithSignals() + { + io_context ioc(Backend); + signal_set s(ioc.get_executor(), SIGINT, SIGTERM); + + BOOST_TEST_PASS(); + } + void testMoveConstruct() { io_context ioc(Backend); @@ -795,6 +811,8 @@ struct signal_set_test testConstructWithOneSignal(); testConstructWithTwoSignals(); testConstructWithThreeSignals(); + testConstructFromExecutor(); + testConstructFromExecutorWithSignals(); testMoveConstruct(); testMoveAssign(); testMoveAssignCrossContext(); From 732f45727f273dc67d30dd49c579bfdf8cdd875f Mon Sep 17 00:00:00 2001 From: Steve Gerbino Date: Wed, 17 Jun 2026 16:40:35 +0200 Subject: [PATCH 2/2] ci: bump flamegraph to v1.9.5 and make the step non-blocking The flamegraph action crashes in its Combine Time Traces step with write EINVAL on the runner, independent of action version or Node runtime: its log stream is a socket under docker exec and the writev is rejected. The flamegraph is a non-critical compile-time diagnostic and the time-trace matrix variant still validates the -ftime-trace build, so mark the step continue-on-error rather than gate CI on a broken upstream post-processing step. Also bump to v1.9.5 (latest) and rename the github_token input to github-token to clear the deprecated-input warning. --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b279982bf..b0013d770 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -676,12 +676,13 @@ jobs: --warnings-as-errors='*' - name: FlameGraph - uses: alandefreitas/cpp-actions/flamegraph@v1.9.0 + uses: alandefreitas/cpp-actions/flamegraph@v1.9.5 if: matrix.time-trace + continue-on-error: true with: source-dir: corosio-root build-dir: corosio-root/__build__ - github_token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Generate Coverage Report if: ${{ matrix.coverage && matrix.linux }}