Skip to content

Commit

Permalink
Minor fixes from getting it to build first time.
Browse files Browse the repository at this point in the history
  • Loading branch information
ned14 authored and klemens-morgenstern committed Jul 13, 2023
1 parent 0b991a4 commit 32d5429
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ endif()

if (NOT BOOST_ASYNC_BUILD_INLINE)
find_package(Threads REQUIRED)
find_package(Boost REQUIRED container system json)
# Boost 1.82 is the first with a Boost.ASIO with necessary support
find_package(Boost 1.82 REQUIRED container system json)
include_directories(include)
endif()

Expand Down
2 changes: 1 addition & 1 deletion example/outcome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ outcome_v2::awaitables::lazy<int> lazy_func(int x)
co_return x + 1;
}

outcome_v2::awaitables::lazy<int> eager_func(int x)
outcome_v2::awaitables::eager<int> eager_func(int x)
{
co_return x + 1;
}
Expand Down
4 changes: 4 additions & 0 deletions include/boost/async/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
# endif
#endif

#if BOOST_VERSION < 108200
#error "Boost.Async needs Boost v1.82 or later otherwise the Boost.ASIO is missing needed support"
#endif

#if defined(_MSC_VER)
// msvc doesn't correctly suspend for self-deletion, hence we must workaround here
#define BOOST_ASYNC_NO_SELF_DELETE 1
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ This library works around that using more posts, which can cause slight differen

** This is not yet an official boost library. **

This library provides a set of easy to use coroutine primitives & utilities.
This library provides a set of easy to use coroutine primitives & utilities for Boost.ASIO. A minimum of Boost 1.82 is necessary as the ASIO in that version has needed support. C++ 20 is needed for C++ coroutines.

The assumptions are:

- `io_context` is the execution_context of choice.
- Any `asio::io_context` is single threaded
- Eager execution is the way to go
- If `asio::io_context` is the executor, no more than one kernel thread executes within it at a time.
- Eager execution is the way to go.
- A thread created with promise is only using promise stuff.

## Entry points
Expand Down

0 comments on commit 32d5429

Please sign in to comment.