1

I made a function that takes a number of asynchronous data-retrieval-functions and calls a callback when all functions return their data.

I'm wrestling with the terminology though. I've found similar examples here on StackOverflow but none of them offer anything in the way of solid terminology.

Resources that illustrate the functionality:

Related terminology: fork, wait, synchronize, semaphore.

What is a good name for this function?

6
  • 1
    Deferreds. You are using the jQuery 1.5 deferred objects right? It's simply $.when. Futures refers to this as a join. Commented Jun 23, 2011 at 16:32
  • I'm not using jQuery but I guess my function is similar to a $.when([multiple]).then() structure. I'll look into it. Thanks! Commented Jun 23, 2011 at 18:57
  • @FritsvanCampen Ah in that case look at commonJS for word choice. Commented Jun 23, 2011 at 21:53
  • The commonJS API looks very similar to the jQuery API. waterken.sourceforge.net/web_send/#API Commented Jun 24, 2011 at 13:44
  • I meant CommonJS Commented Jun 24, 2011 at 13:45

2 Answers 2

0

How about "waitAll"? It's succinct, but it still gets the point across about what it does.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your answer. It doesn't just wait. The functions are very specifically data retrieving functions.
0

For the sake of being complete. There isn't really a good word for it (yet). But frameworks like jQuery and commonJS have adopted a deferred API that allows you to make eventual promises about asynchronous requests. This is what I'll be using.

You can find more info when you look at the documentation of the mentioned frameworks but it's roughly like this:

FW.when([asynchrnous_request, ... ]).then(do_something) 

The then-clause will fire when all requests have returned successfully.

You'll probably want to do something with error handling and manually fulfilling (or rejecting) promises but this is beyond the scope of my question.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.