whitespace for readability
This commit is contained in:
parent
6dd0251be8
commit
87b93e6f9e
@ -66,11 +66,13 @@ var Profiler = require('../profiler');
|
||||
getAvalaibleWorker:function(){
|
||||
return this._workers.pop()
|
||||
},
|
||||
|
||||
releaseWorker:function(worker){
|
||||
console.log("releasing worker ", worker)
|
||||
this._workers.push(worker)
|
||||
this.processNextTileRequestInQueue()
|
||||
},
|
||||
|
||||
processNextTileRequestInQueue:function(){
|
||||
console.log("processing next ",this._tileProcessingQueue.length, this._workers.length )
|
||||
if(this._tileProcessingQueue.length>0){
|
||||
@ -78,6 +80,7 @@ var Profiler = require('../profiler');
|
||||
this.requestWorker(job.rows,job.coord,job.zoom, job.options, job.callback)
|
||||
}
|
||||
},
|
||||
|
||||
requestWorker:function(rows,coord,zoom,options,callback){
|
||||
worker = this.getAvalaibleWorker()
|
||||
self = this
|
||||
@ -92,13 +95,14 @@ var Profiler = require('../profiler');
|
||||
this.addToTileProcessingQueue(rows,coord,zoom,options,callback)
|
||||
}
|
||||
},
|
||||
|
||||
addToTileProcessingQueue:function(rows,coord,zoom, options, callback){
|
||||
this._tileProcessingQueue.push({rows:rows, coord:coord, zoom:zoom, options: options, callback:callback})
|
||||
},
|
||||
|
||||
/**
|
||||
* Creates a worker to process the tile
|
||||
*/
|
||||
|
||||
createProccessTileWorker:function(){
|
||||
var workerFunction = "var proccessTile ="+ this.proccessTileSerial.toString()
|
||||
var wrapper = "; self.onmessage = function(e){var data = JSON.parse(e.data); JSON.stringify(self.postMessage(proccessTile(data.rows,data.coord, data.zoom, data.options)))}"
|
||||
@ -124,6 +128,7 @@ var Profiler = require('../profiler');
|
||||
this.requestWorker(rows,coord,zoom,workerSafeOptions,callback)
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* return the torque tile encoded in an efficient javascript
|
||||
* structure:
|
||||
|
Loading…
Reference in New Issue
Block a user