Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ jobs:

- name: Install dependencies
run: |
sudo apt-get install -y doxygen python3-sphinx python3-sphinx-rtd-theme graphviz
sudo apt-get install -y doxygen python3-sphinx python3-sphinx-rtd-theme graphviz \
libtbb-dev libtaskflow-cpp-dev
pip3 install breathe sphinxcontrib-bibtex sphinx_copybutton IPython myst_parser \
nbsphinx

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DSTDEXEC_BUILD_DOCS:BOOL=ON
run: cmake -B ${{github.workspace}}/build \
-DSTDEXEC_BUILD_DOCS:BOOL=ON \
-DSTDEXEC_ENABLE_ASIO:BOOL=ON \
-DSTDEXEC_ASIO_IMPLEMENTATION:STRING=standalone \
-DSTDEXEC_ENABLE_TASKFLOW:BOOL=ON \
-DSTDEXEC_ENABLE_TBB:BOOL=ON

- name: Build
run: cmake --build ${{github.workspace}}/build --target docs
Expand Down
17 changes: 12 additions & 5 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,26 @@
find_package(Doxygen REQUIRED)
find_package(Sphinx REQUIRED)

include(../cmake/Modules/ConfigureASIO.cmake)

# Find all the public headers
set(STDEXEC_PUBLIC_HEADER_DIR ${CMAKE_SOURCE_DIR}/include)
file(GLOB_RECURSE STDEXEC_PUBLIC_HEADERS ${STDEXEC_PUBLIC_HEADER_DIR}/*.hpp)

set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/include)
# Doxygen's INPUT tag accepts whitespace-separated, individually-quoted
# paths. CMake serializes lists with ';', which Doxygen would treat as
# part of a single path, so we explicitly quote each entry and join
# with a space here. (The corresponding line in Doxyfile.in must NOT
# wrap @DOXYGEN_INPUT_DIR@ in another layer of quotes.)
string(JOIN " " DOXYGEN_INPUT_DIR
"\"${PROJECT_SOURCE_DIR}/include\""
"\"${CMAKE_CURRENT_BINARY_DIR}\"")
string(JOIN " " DOXYGEN_EXCLUDE_DIR
"\"${PROJECT_SOURCE_DIR}/include/execpools\""
"\"${PROJECT_SOURCE_DIR}/include/tbbexec\""
"\"${PROJECT_SOURCE_DIR}/include/asioexec\"")
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/build/doxygen)
set(DOXYGEN_EXCLUDE_DIR ${PROJECT_SOURCE_DIR}/include/execpools)
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml)
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set(COMPILATION_DB_PATH ${PROJECT_SOURCE_DIR})

# Find the location of stddef.h
execute_process(COMMAND echo "#include <stddef.h>"
Expand Down
19 changes: 9 additions & 10 deletions docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ FULL_PATH_NAMES = YES
# will be relative from the directory where doxygen is started.
# This tag requires that the tag FULL_PATH_NAMES is set to YES.

STRIP_FROM_PATH =
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@

# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
# path mentioned in the documentation of a class, which tells the reader which
Expand Down Expand Up @@ -943,7 +943,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = "@DOXYGEN_INPUT_DIR@"
INPUT = @DOXYGEN_INPUT_DIR@

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -1020,7 +1020,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = "@DOXYGEN_EXCLUDE_DIR@"
EXCLUDE = @DOXYGEN_EXCLUDE_DIR@

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -2366,18 +2366,23 @@ INCLUDE_FILE_PATTERNS =
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = "__cplusplus=202302L" \
"__cpp_explicit_this_parameter=202110L" \
"STDEXEC_DOXYGEN_INVOKED=1" \
"STDEXEC=stdexec" \
"STDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY=1" \
"STDEXEC_PARALLEL_SCHEDULER_INLINE=inline" \
"STDEXEC_ATTRIBUTE(...)= " \
"STDEXEC_IMMOVABLE(X)=X(X&&) = delete" \
"STDEXEC_IMMOVABLE_NO_UNIQUE_ADDRESS= " \
"STDEXEC_AUTO_RETURN(...)=->decltype(auto){ return __VA_ARGS__; }" \
"STDEXEC_EXPLICIT_THIS_BEGIN(...)=__VA_ARGS__" \
"STDEXEC_EXPLICIT_THIS_END(...)= " \
"STDEXEC_CLANG()=1" \
"STDEXEC_CLANG_CL()=0" \
"STDEXEC_APPLE_CLANG()=0" \
"STDEXEC_MSVC()=0" \
"STDEXEC_GCC()=0" \
"STDEXEC_NVCC()=0" \
"STDEXEC_NVHPC()=0" \
"STDEXEC_EDG()=0" \
"STDEXEC_PRAGMA_PUSH()= " \
Expand Down Expand Up @@ -2815,10 +2820,4 @@ MSCGEN_TOOL =

MSCFILE_DIRS =

# Use clang to parse the source code.
CLANG_ASSISTED_PARSING = YES
CLANG_DATABASE_PATH = "@COMPILATION_DB_PATH@"
CLANG_OPTIONS = -isystem "@STDDEF_INCLUDE_PATH@" \
-std=c++23 \
-DSTDEXEC_DOXYGEN_INVOKED=1 \
-DSTDEXEC_PARALLEL_SCHEDULER_HEADER_ONLY=1
CLANG_ASSISTED_PARSING = NO
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ separates concerns cleanly, enabling:
- Full support for customization: Plug in your own schedulers, senders, adaptors,
allocators, stop tokens, etc.

Senders end `Callback Hell <https://chatgpt.com/s/t_687fe7703d708191b94247513ad28246>`_.
Senders end `Callback Hell <https://en.wiktionary.org/wiki/callback_hell>`_.


🚦 Standardization Status (as of 2025)
🚦 Standardization Status (as of 2026)
--------------------------------------

- The core Sender model has been accepted into the C++ standard for C++26.
Expand Down
46 changes: 23 additions & 23 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ The concepts fall into three layers:
its lifetime is tracked.

Sender concepts
~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^

.. _ref-concept-sender:

``sender``
^^^^^^^^^^
~~~~~~~~~~

.. doxygenconcept:: stdexec::sender

Expand All @@ -59,24 +59,24 @@ Sender concepts
.. _ref-concept-sender_in:

``sender_in``
^^^^^^^^^^^^^
~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::sender_in

.. _ref-concept-sender_to:

``sender_to``
^^^^^^^^^^^^^
~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::sender_to

Receiver and operation-state concepts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. _ref-concept-receiver:

``receiver``
^^^^^^^^^^^^
~~~~~~~~~~~~

.. doxygenconcept:: stdexec::receiver

Expand All @@ -85,40 +85,40 @@ Receiver and operation-state concepts
.. _ref-concept-receiver_of:

``receiver_of``
^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::receiver_of

.. _ref-concept-operation_state:

``operation_state``
^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::operation_state

.. doxygenstruct:: stdexec::operation_state_tag

Context concepts
~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^

.. _ref-concept-scheduler:

``scheduler``
^^^^^^^^^^^^^
~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::scheduler

.. _ref-concept-scope_token:

``scope_token``
^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::scope_token

.. _ref-concept-scope_association:

``scope_association``
^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~

.. doxygenconcept:: stdexec::scope_association

Expand Down Expand Up @@ -154,12 +154,12 @@ narrative walkthrough of how these fit together when writing a new
sender adaptor.

Sender-side
~~~~~~~~~~~
^^^^^^^^^^^

.. _ref-cpo-connect:

``connect``
^^^^^^^^^^^
~~~~~~~~~~~

.. doxygenstruct:: stdexec::connect_t
:members:
Expand All @@ -169,7 +169,7 @@ Sender-side
.. _ref-cpo-get_completion_signatures:

``get_completion_signatures``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unlike the other entries in this section, ``get_completion_signatures``
is a *function template* (not a CPO instance), so it has no underlying
Expand All @@ -180,25 +180,25 @@ share documentation:
:sections: briefdescription detaileddescription

Operation-state-side
~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^

.. _ref-cpo-start:

``start``
^^^^^^^^^
~~~~~~~~~

.. doxygenstruct:: stdexec::start_t
:members:

.. doxygenvariable:: stdexec::start

Receiver-side
~~~~~~~~~~~~~
^^^^^^^^^^^^^

.. _ref-cpo-set_value:

``set_value``
^^^^^^^^^^^^^
~~~~~~~~~~~~~

.. doxygenstruct:: stdexec::set_value_t
:members:
Expand All @@ -208,7 +208,7 @@ Receiver-side
.. _ref-cpo-set_error:

``set_error``
^^^^^^^^^^^^^
~~~~~~~~~~~~~

.. doxygenstruct:: stdexec::set_error_t
:members:
Expand All @@ -218,7 +218,7 @@ Receiver-side
.. _ref-cpo-set_stopped:

``set_stopped``
^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~

.. doxygenstruct:: stdexec::set_stopped_t
:members:
Expand All @@ -228,7 +228,7 @@ Receiver-side
.. _ref-cpo-get_env:

``get_env``
^^^^^^^^^^^
~~~~~~~~~~~

.. doxygenstruct:: stdexec::get_env_t
:members:
Expand Down Expand Up @@ -315,7 +315,7 @@ for an approachable introduction.
.. _ref-just_from:

``just_from`` (experimental) — like ``just`` but value-producing via a function
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. doxygenvariable:: experimental::execution::just_from

Expand Down
17 changes: 11 additions & 6 deletions docs/source/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ From the perspective of the user, the core concepts of the Sender model are the
**sender** abstraction, the **scheduler** abstraction, and **sender algorithms**.

1. Scheduler
^^^^^^^^^^^^
~~~~~~~~~~~~

A **scheduler** is an object that provides a way to schedule work. They are lightweight
handles to what is often a heavy-weight and immovable **execution context**. Execution
Expand All @@ -56,16 +56,13 @@ is executed on a context by chaining continuations to one of these senders, and
it to one of the algorithms that starts work, like ``stdexec::sync_wait``.

2. Sender
^^^^^^^^^
~~~~~~~~~

A **sender** is an object that describes an asynchronous computation that may happen
later. It can do nothing on its own, but when connected to a receiver, it returns an
**operation state** that can start the work described by the sender.

``stdexec`` provides a set of generic **sender algorithms** that can be used to chain
operations together. There are also algorithms, like ``stdexec::sync_wait``, that can
be used to launch the sender. The sender algorithms take care of connecting the sender
to a receiver and managing the lifetime the operation state.
A sender:

- Produces values (or errors) asynchronously.

Expand All @@ -75,6 +72,14 @@ to a receiver and managing the lifetime the operation state.

- Is lazy (does nothing until connected and started).

3. Sender algorithms
~~~~~~~~~~~~~~~~~~~~

``stdexec`` provides a set of generic **sender algorithms** that can be used to chain
operations together. There are also algorithms, like ``stdexec::sync_wait``, that can
be used to launch the sender. The sender algorithms take care of connecting the sender
to a receiver and managing the lifetime the operation state.

.. code-block:: cpp

auto sndr = stdexec::just(42); // Sender that yields 42 immediately
Expand Down
Loading
Loading