chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.94k stars 1.22k forks source link

Question: How to tell if executor is a strand? #1199

Open rzvc opened 1 year ago

rzvc commented 1 year ago

Hello,

Is it possible to tell if an executor is a strand? I would like to use an assertion, which verifies that an IO object's executor is actually a strand.

assert( is_strand(obj.get_executor()) );    // What would is_strand() look like?

Cheers.