ska-sa / spead2

Library for the Streaming Protocol for Exchange of Astronomical Data (SPEAD)
http://spead2.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
23 stars 14 forks source link

Make async_send_heap and async_send_heaps work with completion tokens #293

Closed bmerry closed 12 months ago

bmerry commented 12 months ago

When using a completion token rather than a callback function, the boolean return is no longer available. Unfortunately this requires having two overloads.

Using this with boost::asio::use_future will greatly simplify the common case of sending a heap then at a later point blocking until it is sent or throwing if there was a problem.

bmerry commented 12 months ago

@sjperkins has offered to review; I can't seem to assign the review to him though (maybe not part of the organisation)?

bmerry commented 12 months ago

@sjperkins thanks for the review. Is there anything you think still needs to be addressed? (the MacOS wheel build failures are a known issues, addressed in #292).

sjperkins commented 12 months ago

@sjperkins thanks for the review. Is there anything you think still needs to be addressed? (the MacOS wheel build failures are a known issues, addressed in #292).

Everything looks in order. Sorry I couldn't be more helpful on the is_convertible query.

james-smith-za commented 12 months ago

Sorry @bmerry this is completely beyond my understanding of C++ at the moment so I'm not going to be able to contribute usefully.

bmerry commented 12 months ago

Sorry I couldn't be more helpful on the is_convertible query.

Actually that SO link was pretty helpful, thanks.