2shortplanks/attempt — pull request #1 by aarondcohen (2012-05-13 23:47:41+00:00)
Title: error_handler parameter and other minor changes

the crux of these changes was the addition of the error_handler parameter. i'm not sold on the name itself, but in the past, i have found this additional functionality to be quite useful for logging and more generic sleep patterns.

there are 2 additional changes that need to be mentioned:
1) supplying "tries => 0" is now a NOOP. before, any value <= 1 ensured at least 1 execution. semantically, that makes less sense, plus this now allows for an additional way to disable a function call.
2) the tries condition is now in the condition part of the while loop, rather than while(1). this was done to clarify the actual loop control and prevent future maintenance from creating an unsafe condition.

i look forward to your feedback,
aaron