Skip to content

Instantly share code, notes, and snippets.

@IbrahimTanyalcin
Created October 25, 2017 02:58
Show Gist options
  • Save IbrahimTanyalcin/6afb6972bf3d659a23c13742fcd671cd to your computer and use it in GitHub Desktop.
Save IbrahimTanyalcin/6afb6972bf3d659a23c13742fcd671cd to your computer and use it in GitHub Desktop.
taskq_test1.js
!function(){
var somePrivateObject = new (function(){this.y = 99;})
function innerFunc(){
console.log("innerFunc!!");
}
function test1 (someEntity) {
console.log("As test1, I will first execute a function from inner scope,\
then log what is exported as 'someEntity',\
then log 'this',\
and finally export myself as 'testItem'");
innerFunc();
console.log(someEntity);
console.log(this);
taskq.export(test1,"testItem");
}
test1._taskqId = 1;
test1._taskqWaitFor = [0];
test1._taskqScope = "refToThis";
taskq.export(somePrivateObject,"refToThis");
taskq.push(test1);
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment