I reinvented channel with a timeout, it was a good brain excercise nevertheless, because LLMs were totally useless at it, because they constantly made suggestions or errors that just lead to wrong locking logic, had to rethink it several times.
Then last night as I drifted to a sleep I figured what I was doing was just a channel with recv_timeout