this problem effects the asio_thread_pool, the taskflow_threadpool, and the tbb_thread_pool. thread_pool_base attempts to customize bulk (and only bulk) as follows:
template <stdexec::sender S, std::integral Shape, class Fun>
STDEXEC_MEMFN_DECL(
auto bulk)(this const scheduler& sch, S&& sndr, Shape shape, Fun fun) noexcept
-> bulk_sender_t<S, Shape, Fun> {
// ...
}
the first thing wrong is that this function does not accept an execution policy. the second wrong thing is that the STDEXEC_MEMFN_DECL macro expands to a hidden overload of tag_invoke:
template <stdexec::sender S, std::integral Shape, class Fun>
friend auto tag_invoke(bulk_t, const scheduler& sch, S&& sndr, Shape shape, Fun fun) noexcept
-> bulk_sender_t<S, Shape, Fun> {
// ...
}
tag_invoke is no longer used to find algorithm customizations, so this overload will never be considered.
thread_pool_base should do like static_thread_pool does by defining a domain with a transform_sender member constrained to accept bulk_chunked_t and bulk_unchunked_t senders that transforms those senders into ones that use thread_pool_base::bulk_enqueue.