Cool.
Could you also check a "candelabrum" branch of node-candle?
https://github.com/AlexeyKupershtokh/node-candle/blob/candelabrum/candle3.js
It's implements the syntax:
var c = new Candelabrum();
var id = c.add(callback).setTimeout().getId();
c.get(id).resolve();

Though it's about 15% (0.85x) slower in the add-settimeout-resolve scenario 
and about 40% slower (0.6x) in add-resolve scenario.

понедельник, 12 ноября 2012 г., 7:08:01 UTC+7 пользователь Jason Brumwell 
написал:
>
> Definitely I think nextTick should be optional, removing it almost doubles 
> ops/sec, thanks for setting this up interested to see where the differences 
> are. I'll issue a PR to make it optional
>
>
> On Wednesday, October 31, 2012 7:48:56 AM UTC-4, Alexey Kupershtokh wrote:
>>
>> Here it is: https://github.com/AlexeyKupershtokh/node-candle
>>
>> it's similar to:
>> https://github.com/coolaj86/futures/tree/v2.0/future
>> and
>> https://github.com/temsa/addTimeout
>> to some extent, except that the callbacks are able to free in my case 
>> allowing to avoid leaks.
>>
>> As an yet another example, if you use a callback wrapped by 
>> addTimeout(timeout, cb) or future.once(cb).setTimeout(timeout) as an ACK 
>> callback for a socket.io request that is never acknowledged, this 
>> wrapepd callback would exist till the socket is disconnected.
>>
>> Any response is highly appreciated.
>>
>

-- 
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