mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-31 19:30:07 +00:00 
			
		
		
		
	minor fix and started work on generating previews in a separate process...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									eda41a4363
								
							
						
					
					
						commit
						80d9153873
					
				| @ -57,14 +57,14 @@ var SharpActions = actions.Actions({ | |||||||
| 	}, | 	}, | ||||||
| 
 | 
 | ||||||
| 	// XXX BUG (nw.js): this does not work until child_process.fork(..) is fixed...
 | 	// XXX BUG (nw.js): this does not work until child_process.fork(..) is fixed...
 | ||||||
| 	startWorker: ['- Sharp/', | 	startPreviewWorker: ['- Sharp/', | ||||||
| 		function(){ | 		function(){ | ||||||
| 			if(this.previewConstructorWorker){ | 			if(this.previewConstructorWorker){ | ||||||
| 				return | 				return | ||||||
| 			} | 			} | ||||||
| 			this.previewConstructorWorker = cp.form('./worker/preview-constructor.js') | 			this.previewConstructorWorker = cp.fork('./workers/preview-constructor.js') | ||||||
| 		}], | 		}], | ||||||
| 	stopWorker: ['- Sharp/', | 	stopPreviewWorker: ['- Sharp/', | ||||||
| 		function(){ | 		function(){ | ||||||
| 			this.previewConstructorWorker && this.previewConstructorWorker.kill() | 			this.previewConstructorWorker && this.previewConstructorWorker.kill() | ||||||
| 			delete this.previewConstructorWorker | 			delete this.previewConstructorWorker | ||||||
|  | |||||||
							
								
								
									
										19
									
								
								ui (gen4)/workers/preview-constructor.js
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										19
									
								
								ui (gen4)/workers/preview-constructor.js
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | /********************************************************************** | ||||||
|  | *  | ||||||
|  | * | ||||||
|  | * | ||||||
|  | **********************************************************************/ | ||||||
|  | 
 | ||||||
|  | var sharp = require('sharp') | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | /*********************************************************************/ | ||||||
|  | 
 | ||||||
|  | process.on('message', function(m){ | ||||||
|  | 	console.log('Got:', m) | ||||||
|  | }) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | /********************************************************************** | ||||||
|  | * vim:set ts=4 sw=4 :                                                */ | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user