jhurliman / node-rate-limiter

A generic rate limiter for node.js. Useful for API clients, web crawling, or other tasks that need to be throttled
MIT License
1.51k stars 135 forks source link

Defer calling callbacks until next event loop iteration #23

Closed xaka closed 9 years ago

xaka commented 9 years ago

It's kind of bad practice to call a callback right away within the same event loop iteration as it might cause synchronization issues, etc., so usually it's deferred by either using process.nextTick or setTimeout.

vladikoff commented 9 years ago

:+1: