thadeudepaula/enqjs — Issue #2: Usage of return keyword
Author: purcaholic
Created: 2011-10-10 16:23:51+00:00
State: open

First of all thanks a lot for this piece of code.

I have an suggestion related to the usage of return keyword in queued functions. Event if everything works fine with context.return('some value'), the usage of return ends up in IDE's parser error and also in thrown error by JSLINT.

What about to use another name for it, e. g.

function taskObject(taskID){
return {
"returnFn" :binder(taskID),
"stop" :function(){},
"timeout":function(){}
}
}

and then in grouped functions something like?

function(){
var self=this;
setTimeout(function(){ self.returnFn("I'm foo"); },900);
},

Regards,
purcaholic