in reply to retrying an action that could fail
... this works great, but I felt like it was sort of a naive approach, and I just wondered if anyone had something clever for this, maybe using some of those less commonly applied loop control constructs that Perl allows.
It looks O.K. to me on first read.
Your approach reminds me of a talk on resilient computing I heard some folks from Bell Labs give many years back. Part of their approach was to retry I/O operations on failure. If I recall correctly, retrying at most 3 times was enough to make something like 98% of error go away.
To those raised on theoretical Computer Science (which somehow neglected to mention that things like disk drives had moving parts), this was a jaw dropper.
|
|---|