brianlmoon/net_gearman — pull request #11 by KevBurnsJr (2013-07-26 17:13:24+00:00)
Title: Net_Gearman_Connection pegs the processor when it can't find a gearmand service

Adding retry limiter in Net_Gearman_Connection to keep from pegging the processor when it can't reach a gearmand service.

Without this usleep, the worker will retry the connection as many as 20,000 times per second during the timeout period, pegging the processor(s).

20 retries seems like a reasonable default.