You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The claim of the comment was that relying on drop to unset the callback would be unsound because drop might not be called.
In that thread, I claimed that that's not an issue because the socket is only 'static anyway (and thus created this issue assuming that the lifetime could be removed from the ReceiveIntoArgs).
Looking at it again, the trouble is not with the socket, but with the buffer that is being received into.
The more accurate description would be that the callback goes to the socket to wake the task (for which it is indeed relevant that the struct is static), but then the buffer is only written to during the polling, which only happens if the task is still active.
Thus,
we'd have an issue only if RIOT were to write into the buffer while the cb is set (Windows style, which would be a good thing conceptionally but RIOT doesn't work that way ATM)
we still do need the lifetimes because the buffer reference is indeed 'a lived.
Therefore, I think the issue should just be closed.
See rust-embedded-community/embedded-nal#103 (comment) and responses.
The text was updated successfully, but these errors were encountered: