Added comment about not being able to call spin_node_until_future_complete inside a callback executed by an executor

This commit is contained in:
Esteve Fernandez 2015-04-28 11:31:12 -07:00
parent 90ba163953
commit 6b6b94faa2

View file

@ -36,6 +36,8 @@ spin_node_until_future_complete(
std::shared_future<FutureT> & future) std::shared_future<FutureT> & future)
{ {
std::future_status status; std::future_status status;
// TODO: does not work recursively right, can't call spin_node_until_future_complete
// inside a callback executed by an executor.
do { do {
executor.spin_node_some(node_ptr); executor.spin_node_some(node_ptr);
status = future.wait_for(std::chrono::seconds(0)); status = future.wait_for(std::chrono::seconds(0));