mirror of
https://github.com/boostorg/cobalt.git
synced 2026-01-22 17:12:14 +00:00
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
[#config]
|
|
== cobalt/config.hpp
|
|
|
|
The config adder allows to config some implementation details of boost.cobalt.
|
|
|
|
=== executor_type
|
|
|
|
The executor type defaults to `boost::asio::any_io_executor`.
|
|
|
|
You can set it to `boost::asio::any_io_executor` by defining `BOOST_COBALT_CUSTOM_EXECUTOR`
|
|
and adding a `boost::cobalt::executor` type yourself.
|
|
|
|
Alternatively, `BOOST_COBALT_USE_IO_CONTEXT` can be defined
|
|
to set the executor to `boost::asio::io_context::executor_type`.
|
|
|
|
=== pmr
|
|
|
|
Boost.cobalt can be used with different pmr implementations, defaulting to `std::pmr`.
|
|
|
|
The following macros can be used to configure it:
|
|
|
|
- `BOOST_COBALT_USE_STD_PMR`
|
|
- `BOOST_COBALT_USE_BOOST_CONTAINER_PMR`
|
|
- `BOOST_COBALT_USE_CUSTOM_PMR`
|
|
|
|
|
|
If you define `BOOST_COBALT_USE_CUSTOM_PMR` you will need to provide a `boost::cobalt::pmr` namespace,
|
|
that is a drop-in replacement for `std::pmr`.
|
|
|
|
Alternatively, the `pmr` use can be disabled with
|
|
|
|
- `BOOST_COBALT_NO_PMR`.
|
|
|
|
In this case, cobalt will use a non-pmr monotonic resource for the
|
|
synchronization functions (<<race,race>>, <<gather, gather>> and <<join, join>>).
|
|
|
|
`use_op` uses a small-buffer-optimized resource which's size can be set by defining
|
|
`BOOST_COBALT_SBO_BUFFER_SIZE` and defaults to 4096 bytes. |