Implement five.tooSlowAsync
five.tooSlow provides the much-needed capability to get five slowly, however, it has one flaw - it's blocking. This could prove to be problematic in applications that need five slowly, but want to do other things while waiting for five.
five.tooSlowAsync is a solution to that problem. It, too, produces five after ~500 milliseconds, but does so asynchronously. It accepts a callback, which 5 is passed to after ~500 milliseconds.
This function will hopefully solve this challenge that many modern applications face - the need to retrieve five slowly, while simultaneously executing other code.
It might not come as a surprise that the 500ms blocking was intentional. It wouldn't be "too slow" otherwise.
An "async" tooSlow is probably more like this, where you get feedback about 5 months later. Would you mind adjusting to match? Or even escalating the delay to 5 years?
That's a good point. However, I'm sure that different applications will have different needs. What do you think about adding a second paramater - which could be one of milliseconds, seconds, minutes, hours, days, weeks, months, years - to decide how long it will wait for?