Please sign in to comment.
A push shouldn't lock NodeJS - added nextTick()
A pollbuffer with very many or heavy listeners can keep NodeJS quite busy on a push - especially if many pushes are made at once. By putting the notification of all listeners on nextTick() we avoid that multiple pushes always results in multiple notifications. If a notification is already due to happen it will wait for that. By putting each individual notification on nextTick() we ensure that very many listeners or a few heavy ones wont lock NodeJS for too long.
- Loading branch information...