VarnaLab/node-organic — pull request #6 by outbounder (2012-09-20 15:05:19+00:00)
Title: adding callback support to plasma

I've been playing around to optimize node-organic's performance and it happened that callback support to plasma is essential part to be able to minimize the overhead.

organic-webcell is currently converted to that scheme already.

in general usage is as follows:

plasma.emit(chemical, sender, callback);
<->
plasma.on(chemicalPattern, function(chemical, sender, callback){});

where within organelles:

this.emit(chemical, callback);
<->
this.on(chemicalPattern, function(chemical, sender, callback){});