Skip to content

Commit

Permalink
more link fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Oct 24, 2023
1 parent f85efeb commit b12241f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ endif()

option(BOOST_COBALT_USE_BOOST_CONTAINER "Use boost.container instead of std::pmr" ${BOOST_COBALT_SHOULD_USE_CONTAINER})


if (NOT BOOST_COBALT_IS_ROOT)
# Generated by `boostdep --cmake cobalt`
# Copyright 2020, 2021 Peter Dimov
Expand Down Expand Up @@ -66,6 +65,10 @@ if (NOT BOOST_COBALT_IS_ROOT)
)
target_compile_features(boost_cobalt PUBLIC cxx_std_20)

if (MSVC)
target_compile_definitions(boost_cobalt PUBLIC _WIN32_WINNT=0x0601)
endif()

if (BOOST_COBALT_USE_BOOST_CONTAINER)
target_link_libraries(boost_cobalt PUBLIC Boost::container)
target_compile_definitions(boost_cobalt PUBLIC BOOST_COBALT_USE_BOOST_CONTAINER_PMR=1 )
Expand Down
15 changes: 11 additions & 4 deletions include/boost/cobalt/thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ struct thread
// Send a cancellation signal
void cancel(asio::cancellation_type type = asio::cancellation_type::all);

// Add the functions similar to `std::thread`
void join();
bool joinable() const;
void detach();

// Allow the thread to be awaited. NOOP if the thread is invalid.
auto operator co_await() &-> detail::thread_awaitable; //<1>
auto operator co_await() && -> detail::thread_awaitable; //<2>
Expand All @@ -42,9 +39,19 @@ struct thread

// end::outline[]
/* tag::outline[]
// Add the functions similar to `std::thread`
void join();
bool joinable() const;
void detach();
executor_type get_executor() const;
end::outline[] */


BOOST_COBALT_DECL void join();
BOOST_COBALT_DECL bool joinable() const;
BOOST_COBALT_DECL void detach();

executor_type get_executor(const boost::source_location & loc = BOOST_CURRENT_LOCATION) const
{
auto st = state_;
Expand Down
2 changes: 1 addition & 1 deletion test/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ project : requirements

import testing ;

lib test_impl : test_main.cpp /boost//cobalt :
lib test_impl : test_main.cpp /boost//cobalt /boost//unit_test_framework :
<link>static
;

Expand Down

0 comments on commit b12241f

Please sign in to comment.