Skip to content

Commit 66c1196

Browse files
fixed faulty use of get_allocator.
Closes #193.
1 parent af72ced commit 66c1196

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/detail/util.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,17 @@ namespace boost::cobalt::detail
1818

1919
void self_destroy(std::coroutine_handle<void> h, const cobalt::executor & exec) noexcept
2020
{
21+
#if defined(BOOST_COBALT_NO_PMR)
22+
asio::post(exec, [del=unique_handle<void>(h.address())]() mutable {});
23+
#else
2124
asio::post(exec,
2225
asio::bind_allocator(
2326
this_thread::get_allocator(),
2427
[del=unique_handle<void>(h.address())]() mutable
2528
{
2629
}));
30+
#endif
31+
2732
}
2833
#endif
2934

0 commit comments

Comments
 (0)