boostorg / cobalt

Coroutines for C++20 & asio
https://www.boost.org/doc/libs/master/libs/cobalt/doc/html/index.html
207 stars 24 forks source link

started on custom_executor docs. #131

Closed klemens-morgenstern closed 11 months ago

anarthal commented 12 months ago

No. prefer_only makes the property on any_io_executor preferable, but not requirable.

This is a guess, but it's likely that the only hard requirement is blocking.never and the context one (that's used to retrieve the execution_context pointer).

My theory is that if a property cannot be required, prefer will just return the original executor. But I'd have to test it.

klemens-morgenstern commented 12 months ago

Tested it, seems to be the case.

klemens-morgenstern commented 12 months ago

See https://gcc.godbolt.org/z/qEj98M5KT