Closed chrysn closed 2 months ago
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,
'a
lived.Therefore, I think the issue should just be closed.
See https://github.com/rust-embedded-community/embedded-nal/issues/103#issuecomment-1930076973 and responses.