mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Docs: expand info about use with worker threads
This commit is contained in:
parent
b0ca23c3e7
commit
d0c8e95641
@ -248,11 +248,17 @@ esbuild app.js --bundle --platform=node --external:sharp
|
||||
|
||||
## Worker threads
|
||||
|
||||
The main thread must call `require('sharp')`
|
||||
before worker threads are created
|
||||
to ensure shared libraries remain loaded in memory
|
||||
On some platforms, including glibc-based Linux,
|
||||
the main thread must call `require('sharp')`
|
||||
_before_ worker threads are created.
|
||||
This is to ensure shared libraries remain loaded in memory
|
||||
until after all threads are complete.
|
||||
|
||||
Without this, the following error may occur:
|
||||
```
|
||||
Module did not self-register
|
||||
```
|
||||
|
||||
## Known conflicts
|
||||
|
||||
### Canvas and Windows
|
||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ const extractDescription = (str) =>
|
||||
.replace(/\s+/g, ' ')
|
||||
.replace(/[^A-Za-z0-9_/\-,. ]/g, '')
|
||||
.replace(/\s+/g, ' ')
|
||||
.substr(0, 180)
|
||||
.substring(0, 200)
|
||||
.trim();
|
||||
|
||||
const extractParameters = (str) =>
|
||||
|
@ -21,6 +21,7 @@ module.exports = [
|
||||
'can',
|
||||
'containing',
|
||||
'contains',
|
||||
'created',
|
||||
'current',
|
||||
'date',
|
||||
'default',
|
||||
@ -43,6 +44,8 @@ module.exports = [
|
||||
'how',
|
||||
'image',
|
||||
'implies',
|
||||
'include',
|
||||
'including',
|
||||
'involve',
|
||||
'its',
|
||||
'last',
|
||||
@ -69,6 +72,7 @@ module.exports = [
|
||||
'provided',
|
||||
'ready',
|
||||
'requires',
|
||||
'requiresharp',
|
||||
'returned',
|
||||
'same',
|
||||
'see',
|
||||
@ -77,6 +81,7 @@ module.exports = [
|
||||
'should',
|
||||
'since',
|
||||
'site',
|
||||
'some',
|
||||
'specified',
|
||||
'spelling',
|
||||
'such',
|
||||
|
Loading…
x
Reference in New Issue
Block a user