On Tue Apr 29 15:46:58 2025 +0000, Matteo Bruni wrote:
Thanks a lot, sorry that I messed up the two arrays in the current version... There's a subtle issue with this: `count` needs to be updated on success as well, otherwise we wait on garbage handles. There are a few alternatives to tackle that, unsure which one you'd prefer:
- duplicate the `count` update in both `if` branches
- move the `count` update back after the branch and the handle type
conversion out of the loop (thus also moving back `server_handles` to the outer scope)
- move the `count` update back after the branch and put both the handle
conversion and the actual wait inside the loop, after the `SERVER_END_REQ` (i.e. `server_handles` goes inside the `do`) The last option above is kinda an in-between and what I tried, it doesn't look too terrible but I don't know that it's particularly preferable.
Ah right, duplicating it before the for loop that converts handles looks alright.