Re: [nodejs] Re: javascript callback guard - prevents a callback to be called twice

2014-08-24 Thread Alexey Petrushin
Usually such errors are tiny and non critical, unless you can start to see it when you need to build something complex that works reliably. I didn't experienced any problem with node.js for couple of projects (also, I use Fibers and don't have any problems with asynchronous issues at all). Unt

Re: [nodejs] Re: javascript callback guard - prevents a callback to be called twice

2014-08-23 Thread Simon Doodkin
people usually try to add a callback add on to an EventEmitter usually thinking to themselves there will be only one error but usually there are several together, usually: on connection error, on write closed connection, on connection timeout, they all come together. https://gist.github.com/shi

Re: [nodejs] Re: javascript callback guard - prevents a callback to be called twice

2014-08-22 Thread zladuric
On Friday, August 22, 2014 10:35:29 AM UTC+2, Alisson Cavalcante Agiani wrote: > > How do people stumble upon this kind of error? > > When you have long and tricky business logic. Ie. I am bidding on a product. Make CC authorization. Is it ok? Yes? Go book a product. Did somebody in the mean ti

Re: [nodejs] Re: javascript callback guard - prevents a callback to be called twice

2014-08-22 Thread Ω Alisson
How do people stumble upon this kind of error? On Thu, Aug 21, 2014 at 3:24 PM, Alexey Petrushin < alexey.petrus...@gmail.com> wrote: > In my understanding the problem is not that it's not possible to prevent > callback from being called twice, with underscore it's as simple as `cb = > _(cb).onc

[nodejs] Re: javascript callback guard - prevents a callback to be called twice

2014-08-21 Thread Alexey Petrushin
In my understanding the problem is not that it's not possible to prevent callback from being called twice, with underscore it's as simple as `cb = _(cb).once()` - but the problem is that it's cumbersome to do it everywhere. On Wednesday, 20 August 2014 00:18:30 UTC+4, Simon Doodkin wrote: > > No