When developing Node.js applications sometimes you need to know when a whole bunch of callbacks have finished. You could just use synchronous methods, but that defeats the point of using Node, doesn't it?

Gatherer lets you set a callback to be run after a whole bunch of other callbacks have returned, but because that sounds incredibly boring it uses a metaphor of parties:

Invite your guests to your gathering.
Once all your guests have accepted their invites, start the party!

You can also set a limit on how long you want to wait for the invites:

gathering.sendInvitations(function(){
if(err==='Error: Timed out'){
// it waited 2000 miliseconds then gave up
}
}, { timeout : 2000 }) // will give up after 2000 ms. Warning: This doesn't cancel the execution of callbacks that are still running.