Fix Worker.terminate()

This commit is contained in:
jeromewu
2020-03-24 02:42:59 +00:00
parent 906dcd369f
commit eef80a979f
13 changed files with 30 additions and 7 deletions

View File

@@ -10,6 +10,7 @@
- [Worker.trim](#worker-trim)
- [Worker.concatDemuxer](#worker-concatDemuxer)
- [Worker.run](#worker-run)
- [Worker.terminate](#worker-terminate)
---
@@ -230,3 +231,17 @@ Worker.run() is similar to FFmpeg cli tool, aims to provide maximum flexiblity f
await worker.run("-i flame.avi -s 1920x1080 output.mp4");
})();
```
<a name="worker-run"></a>
### Worker.terminate(): Promise
Worker.terminate() terminates web worker / worker\_threads, after terminate(), you cannot use this worker anymore.
**Examples:**
```javascript
(async () => {
await worker.terminate();
})();
```