Why nextTick is used when add/dell to room?
fourpixels opened this issue · 2 comments
fourpixels commented
I've seen this multiple times and I can't figure this out. Why when socket is added/deleted from room the callback is called with process.nextTick
?
As there is no option to return an error, nor there is a real synchronous function - is there any reason why this is done? Sometimes it's pretty handy if synchronous.
artofspeed commented
when u scale to multiple servers, it'll not be synchronous, forcing async standardize your development + give a chance for other code to execute
darrachequesne commented
That's a good question actually. It seems to be implemented that way from the beginning (socketio/socket.io@67f7d57). Maybe it was related to other adapter implementations?
Anyway, the callbacks were removed in 53ed3f4, so I think we can close this.