Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Make recv and recvfrom non-blocking #28

Closed
wants to merge 1 commit into from

Conversation

jmthomas
Copy link

@jmthomas jmthomas commented Dec 2, 2013

Your UDPTransport#recv and UDPServerTransport#recvfrom both block which can cause a thread deadlock if used in the wrong way. @ryanmelt reimplemented this with non-blocking calls.

UDPTransport#recv and UDPServerTransport#recvfrom
@hallidave
Copy link
Owner

Under what circumstances does a deadlock occur? How does this patch fix it?

@ghost
Copy link

ghost commented Dec 3, 2013

I believe this was working around various issues I had encountered using the blocking flavors of socket calls in Ruby. (Like: http://bugs.ruby-lang.org/issues/1805) The fix at the time was to block using select instead of directly on the recv/recvfrom call. Probably not applicable to current patched versions of ruby, but wouldn't hurt either. Up to you whether or not to incorporate.

@hallidave hallidave closed this Feb 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants