Add EventEmitter for queue length changes

Remove unnecessary params from Error handler
This commit is contained in:
Lovell Fuller
2015-03-20 15:44:18 +00:00
parent 711f0fefb6
commit 81c710eaa3
4 changed files with 105 additions and 54 deletions

View File

@@ -272,6 +272,19 @@ for example:
output: { file: false, buffer: true, stream: true } } }
```
#### queue
An EventEmitter that emits a `change` event when a task is either:
* queued, waiting for _libuv_ to provide a worker thread
* complete
```javascript
sharp.queue.on('change', function(queueLength) {
console.log('Queue contains ' + queueLength + ' task(s)');
});
```
### Input methods
#### sharp([input])