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
|
## Worker threads
|
||||||
|
|
||||||
The main thread must call `require('sharp')`
|
On some platforms, including glibc-based Linux,
|
||||||
before worker threads are created
|
the main thread must call `require('sharp')`
|
||||||
to ensure shared libraries remain loaded in memory
|
_before_ worker threads are created.
|
||||||
|
This is to ensure shared libraries remain loaded in memory
|
||||||
until after all threads are complete.
|
until after all threads are complete.
|
||||||
|
|
||||||
|
Without this, the following error may occur:
|
||||||
|
```
|
||||||
|
Module did not self-register
|
||||||
|
```
|
||||||
|
|
||||||
## Known conflicts
|
## Known conflicts
|
||||||
|
|
||||||
### Canvas and Windows
|
### 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(/\s+/g, ' ')
|
||||||
.replace(/[^A-Za-z0-9_/\-,. ]/g, '')
|
.replace(/[^A-Za-z0-9_/\-,. ]/g, '')
|
||||||
.replace(/\s+/g, ' ')
|
.replace(/\s+/g, ' ')
|
||||||
.substr(0, 180)
|
.substring(0, 200)
|
||||||
.trim();
|
.trim();
|
||||||
|
|
||||||
const extractParameters = (str) =>
|
const extractParameters = (str) =>
|
||||||
|
@ -21,6 +21,7 @@ module.exports = [
|
|||||||
'can',
|
'can',
|
||||||
'containing',
|
'containing',
|
||||||
'contains',
|
'contains',
|
||||||
|
'created',
|
||||||
'current',
|
'current',
|
||||||
'date',
|
'date',
|
||||||
'default',
|
'default',
|
||||||
@ -43,6 +44,8 @@ module.exports = [
|
|||||||
'how',
|
'how',
|
||||||
'image',
|
'image',
|
||||||
'implies',
|
'implies',
|
||||||
|
'include',
|
||||||
|
'including',
|
||||||
'involve',
|
'involve',
|
||||||
'its',
|
'its',
|
||||||
'last',
|
'last',
|
||||||
@ -69,6 +72,7 @@ module.exports = [
|
|||||||
'provided',
|
'provided',
|
||||||
'ready',
|
'ready',
|
||||||
'requires',
|
'requires',
|
||||||
|
'requiresharp',
|
||||||
'returned',
|
'returned',
|
||||||
'same',
|
'same',
|
||||||
'see',
|
'see',
|
||||||
@ -77,6 +81,7 @@ module.exports = [
|
|||||||
'should',
|
'should',
|
||||||
'since',
|
'since',
|
||||||
'site',
|
'site',
|
||||||
|
'some',
|
||||||
'specified',
|
'specified',
|
||||||
'spelling',
|
'spelling',
|
||||||
'such',
|
'such',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user