2
0
mirror of https://github.com/boostorg/cobalt.git synced 2026-01-19 16:12:15 +00:00
Files
cobalt/doc/reference/concepts.adoc
Klemens Morgenstern 45901641ac renamed to cobalt.
2023-10-16 21:42:07 +08:00

21 lines
630 B
Plaintext

[#concepts]
== cobalt/concepts.hpp
[#awaitable]
=== Awaitable
An awaitable is an expression that can be used with `co_await`.
[source,cpp]
----
include::../../include/boost/cobalt/concepts.hpp[tag=outline]
----
WARNING: <<awaitable,awaitables>> in this library require that the coroutine promise
return their executor by const reference if they provide one. Otherwise it'll use `this_thread::get_executor()`.
[#enable_awaitables]
=== Enable awaitables
Inheriting `enable_awaitables` will enable a coroutine to co_await anything through `await_transform`
that would be `co_await`-able in the absence of any `await_transform`.