Skip to content

Commit e82a585

Browse files
committed
Ensure AsyncWorker options are persisted #2130
1 parent c1d4a68 commit e82a585

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

docs/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Requires libvips v8.9.1
1818
* Ensure N-API prebuilt binaries work on RHEL7 and its derivatives.
1919
[#2119](https://github.com/lovell/sharp/issues/2119)
2020

21+
* Ensure AsyncWorker options are persisted.
22+
[#2130](https://github.com/lovell/sharp/issues/2130)
23+
2124
### v0.25.1 - 7th March 2020
2225

2326
* Ensure prebuilt binaries are fetched based on N-API version.

src/metadata.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ Napi::Value metadata(const Napi::CallbackInfo& info) {
229229
// Join queue for worker thread
230230
Napi::Function callback = info[1].As<Napi::Function>();
231231
MetadataWorker *worker = new MetadataWorker(callback, baton, debuglog);
232+
worker->Receiver().Set("options", options);
232233
worker->Queue();
233234

234235
// Increment queued task counter

src/pipeline.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
13601360
// Join queue for worker thread
13611361
Napi::Function callback = info[1].As<Napi::Function>();
13621362
PipelineWorker *worker = new PipelineWorker(callback, baton, debuglog, queueListener);
1363+
worker->Receiver().Set("options", options);
13631364
worker->Queue();
13641365

13651366
// Increment queued task counter

src/stats.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Napi::Value stats(const Napi::CallbackInfo& info) {
154154
// Join queue for worker thread
155155
Napi::Function callback = info[1].As<Napi::Function>();
156156
StatsWorker *worker = new StatsWorker(callback, baton, debuglog);
157+
worker->Receiver().Set("options", options);
157158
worker->Queue();
158159

159160
// Increment queued task counter

0 commit comments

Comments
 (0)