-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add async test func support for whilst/until, deprecate during? #850
Comments
I'm in partial agreement, however detecting via I'd be more inclined to do this in |
Yeah, async.whilst( testFn, isAsnyc=false, asyncFn, callback)
async.doWhilst(asyncFn, testFn, isAsnyc=false, callback) |
I'd rather seperate names On Sun, Jul 19, 2015 at 3:15 PM, Alexander Early [email protected]
|
@megawac |
Another thought here: we could make the |
I see 3 ways forward here:
Personally, I like option 3, seems to make the most sense. Migrating is easy with |
I like option 3) as well. I hate having to refer to the documentation to figure out which method to use every damn time |
Alright, few qualms with
during
anddoDuring
, along with the synchronouswhilst
,doWhilst
,until
anddoUntil
.First of all, how is
during
semantically correct? During means within a duration, notwithstanding iteration (but instead, time).Secondly, why was
during
and its sister function chosen over anFunction.length === 0
approach for two identical methodswhilst
anddoWhilst
(and then left out for the two counterparts,until
anddoUntil
)?Third, doesn't a synchronous test completely go against the idea of Async to begin with?
Why not
during
anddoDuring
(i.e. revert during & doDuring with async test #800)whilst
,doWhilst
,until
anddoUntil
Function.length
check on the passed function and treating it as async if its length is greater than 0These methods are severely crippled by breaking the most obvious pattern of this library, and adding copies to fix their problems is a messy solution.
I'd be happy to do a pull request.
The text was updated successfully, but these errors were encountered: