Docs: add section about worker threads

This commit is contained in:
Lovell Fuller 2020-06-18 13:42:04 +01:00
parent e8149f5295
commit c91373fba3

View File

@ -177,3 +177,10 @@ npx electron-rebuild
Further help can be found at
[https://electronjs.org/docs/tutorial/using-native-node-modules](https://electronjs.org/docs/tutorial/using-native-node-modules)
## Worker threads
The main thread must call `require('sharp')`
before worker threads are created
to ensure shared libraries remain loaded in memory
until after all threads are complete.