четверг, 17 января 2013 г., 2:09:28 UTC+2 пользователь Alan Hoffmeister 
написал:

> Well, I think Jake was talking about queuing the callbacks and waiting for 
> the event to return back and fire those callbacks. This is a pattern that I 
> try to avoid inside Node.js because of the potential memory leaking 
> probability.
>
> This is quite different, the method you talk about allow only to run list 
of handlers you know. Is easy to handle with async[series || parallel || 
waterfall].
But this approach allow to fire an event and listeners that you've even 
didn't know about may do they work async and callback so app could run his 
next step.
 

> What if something went wrong and the event never "ping back"? Your 
> callback will stay there ocuping memory.
>
> The same we could talk about any other mistake, same thing goes if someone 
does something wrong...
 

> --
> Att,
> Alan Hoffmeister
>
>
> 2013/1/16 Katsumoto <[email protected] <javascript:>>
>
>> What abuse or problem could be here if this is normal async flow, event 
>> handler could return error as first argument.
>>
>> среда, 16 января 2013 г., 8:54:31 UTC+2 пользователь Raynos написал:
>>>
>>> You guys realize that using events to effectively call a series of 
>>> functions in parallel or series is abuse of the event emitter right.
>>>
>>> What your doing there is RPC over events. RPC is best done with 
>>> something like functions or methods
>>>
>>> If an event handler can error you need to put down your EventEmitter and 
>>> think about your code and how to structure it.
>>>
>>>
>>> On Tue, Jan 15, 2013 at 2:48 PM, Brian Link <[email protected]> wrote:
>>>
>>>> Very cool.  I've been loving this pattern. Bright minds ...
>>>>
>>>>
>>>> On Tuesday, January 15, 2013 2:35:31 PM UTC-8, Katsumoto wrote:
>>>>>
>>>>> I'm using the same flow for almost a year in my framework. 
>>>>> Here is my lightweight implementation: https://github.com/Shogun147/**
>>>>> K**atana/blob/master/lib/**bootstra**p.js#L1-L40<https://github.com/Shogun147/Katana/blob/master/lib/bootstrap.js#L1-L40>
>>>>>
>>>>  -- 
>>>> Job Board: http://jobs.nodejs.org/
>>>> Posting guidelines: https://github.com/joyent/**node/wiki/Mailing-List-
>>>> **Posting-Guidelines<https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines>
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nodejs" group.
>>>> To post to this group, send email to [email protected]
>>>>
>>>> To unsubscribe from this group, send email to
>>>> nodejs+un...@**googlegroups.com
>>>>
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/nodejs?hl=en?hl=en<http://groups.google.com/group/nodejs?hl=en?hl=en>
>>>>
>>>
>>>  -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to