Shopify/statsd-instrument — pull request #29 by csfrancis (2013-11-21 03:42:01+00:00)
Title: Get rid of Timeout#timeout

@camilo, @jstorimer /cc: @tobi

This gets rid of the call to `timeout` when writing results to StatsD. Using a timeout to write to a UDP socket does not make sense, given the stateless nature of UDP. Also, Ruby timeouts are notoriously :shit:, as documented here, https://coderwall.com/p/1novga, for example. This has manifested stuck background jobs in Shopify.

Also, calling `connect` on the UDP socket (though it doesn't really make sense) actually flows through a more optimal code path when calling `send`: https://github.com/ruby/ruby/blob/trunk/ext/socket/udpsocket.c#L167