ECP-VeloC / AXL

Asynchronous Transfer Library
MIT License
2 stars 8 forks source link

wait on cancelled transfer before free in stop #72

Closed adammoody closed 4 years ago

adammoody commented 4 years ago

We say it's required to AXL_Wait on a transfer after it has been AXL_Cancel'ed.

https://github.com/ECP-VeloC/AXL/tree/master/doc

However we were not doing that within our AXL_Stop implementation. I forget if that was intentional or an oversight. This PR adds in the AXL_Wait call.

I also restructured the loop to issue all cancels, then all waits, then all frees. If cancel or wait is slow, this lets a bunch of cancel/wait requests to run in parallel in case there are multiple outstanding transfers.