sql_channel: Ensure we save reference to MultipleQueue to start
This commit is contained in:
parent
2a7cfd9776
commit
9db42bc4c6
1 changed files with 4 additions and 2 deletions
|
@ -73,12 +73,14 @@ function initialize() {
|
|||
makeNewMultipleQueue();
|
||||
multipleQueue.pause();
|
||||
|
||||
const multipleQueueRef = multipleQueue;
|
||||
const singleQueueRef = singleQueue;
|
||||
|
||||
singleQueue = null;
|
||||
const promise = multipleQueue.add(() => fn(...args));
|
||||
const promise = multipleQueueRef.add(() => fn(...args));
|
||||
await singleQueueRef.onIdle();
|
||||
|
||||
multipleQueue.start();
|
||||
multipleQueueRef.start();
|
||||
result = await promise;
|
||||
} else {
|
||||
makeNewMultipleQueue();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue