mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Improve worker thread support by preventing unload on dlclose
This commit is contained in:
parent
ab8a4ed532
commit
4a37a27cca
@ -213,19 +213,6 @@ use the `FONTCONFIG_PATH` environment variable to point to a custom location.
|
|||||||
|
|
||||||
Embedded SVG fonts are unsupported.
|
Embedded SVG fonts are unsupported.
|
||||||
|
|
||||||
## Worker threads
|
|
||||||
|
|
||||||
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
|
## Known conflicts
|
||||||
|
|
||||||
### Canvas and Windows
|
### Canvas and Windows
|
||||||
|
@ -170,9 +170,9 @@
|
|||||||
'-l:libvips-cpp.so.42'
|
'-l:libvips-cpp.so.42'
|
||||||
],
|
],
|
||||||
'ldflags': [
|
'ldflags': [
|
||||||
# Ensure runtime linking is relative to sharp.node
|
|
||||||
'-Wl,-s',
|
'-Wl,-s',
|
||||||
'-Wl,--disable-new-dtags',
|
'-Wl,--disable-new-dtags',
|
||||||
|
'-Wl,-z,nodelete',
|
||||||
'-Wl,-rpath=\'$$ORIGIN/../../sharp-libvips-<(platform_and_arch)/lib\'',
|
'-Wl,-rpath=\'$$ORIGIN/../../sharp-libvips-<(platform_and_arch)/lib\'',
|
||||||
'-Wl,-rpath=\'$$ORIGIN/../../../<(sharp_libvips_version)/sharp-libvips-<(platform_and_arch)/lib\'',
|
'-Wl,-rpath=\'$$ORIGIN/../../../<(sharp_libvips_version)/sharp-libvips-<(platform_and_arch)/lib\'',
|
||||||
'-Wl,-rpath=\'$$ORIGIN/../../node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\'',
|
'-Wl,-rpath=\'$$ORIGIN/../../node_modules/@img/sharp-libvips-<(platform_and_arch)/lib\'',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user