diff options
Diffstat (limited to 'node_modules/webworker-threads/test/test08_sigkill_leaks.js')
| -rw-r--r-- | node_modules/webworker-threads/test/test08_sigkill_leaks.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/node_modules/webworker-threads/test/test08_sigkill_leaks.js b/node_modules/webworker-threads/test/test08_sigkill_leaks.js new file mode 100644 index 0000000..8b04c47 --- /dev/null +++ b/node_modules/webworker-threads/test/test08_sigkill_leaks.js @@ -0,0 +1,30 @@ + + +var Thread= require('webworker-threads'); + +function cb (e,m) { + this.destroy(); + console.log('['+this.id+'].destroy()'); + //this.eval('0', cb); + again(); +} + + +function again () { + Thread.create().eval('0', cb); +} + + +var i= +process.argv[2] || 1; +console.log('Using '+ i+ ' threads'); + + + +while (i--) { + again(); +} + + +process.on('exit', function () { + console.log("process.on('exit') -> BYE!"); +}); |
