asio-tr2
asio-tr2 copied to clipboard
Consider design issue of whether running_in_this_thread should be provided
Or just used as an implementation detail for specification.
One of the reasons it was originally added to asio was a feature request from a user:
http://sourceforge.net/p/asio/feature-requests/20/
Pre-Lenexa Summary
[io_service.exec], [async.strand]
The proposal from Cologne is that this function might be removed.
My view is that this function should be kept. It simplifies the specification of some of the other member functions. Furthermore, it was originally added to Asio in response to a user feature request -- they wanted to be able to assert whether code was running inside a strand. Uses of it have also appeared "in the wild":
http://stackoverflow.com/questions/26570120/is-there-a-way-to-check-whether-a-stackful-coroutine-is-in-the-context-of-a-give
https://groups.google.com/forum/#!msg/automatak-dnp3/wFajnn7VN4E/dFWfXUu53IYJ
So I would suggest that some Asio users have found it useful.