Created
October 25, 2017 02:58
-
-
Save IbrahimTanyalcin/6afb6972bf3d659a23c13742fcd671cd to your computer and use it in GitHub Desktop.
taskq_test1.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!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