mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure AsyncWorker options are persisted #2130
This commit is contained in:
@@ -229,6 +229,7 @@ Napi::Value metadata(const Napi::CallbackInfo& info) {
|
||||
// Join queue for worker thread
|
||||
Napi::Function callback = info[1].As<Napi::Function>();
|
||||
MetadataWorker *worker = new MetadataWorker(callback, baton, debuglog);
|
||||
worker->Receiver().Set("options", options);
|
||||
worker->Queue();
|
||||
|
||||
// Increment queued task counter
|
||||
|
||||
@@ -1360,6 +1360,7 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
|
||||
// Join queue for worker thread
|
||||
Napi::Function callback = info[1].As<Napi::Function>();
|
||||
PipelineWorker *worker = new PipelineWorker(callback, baton, debuglog, queueListener);
|
||||
worker->Receiver().Set("options", options);
|
||||
worker->Queue();
|
||||
|
||||
// Increment queued task counter
|
||||
|
||||
@@ -154,6 +154,7 @@ Napi::Value stats(const Napi::CallbackInfo& info) {
|
||||
// Join queue for worker thread
|
||||
Napi::Function callback = info[1].As<Napi::Function>();
|
||||
StatsWorker *worker = new StatsWorker(callback, baton, debuglog);
|
||||
worker->Receiver().Set("options", options);
|
||||
worker->Queue();
|
||||
|
||||
// Increment queued task counter
|
||||
|
||||
Reference in New Issue
Block a user