Improve queuing strategies in the app
This commit is contained in:
parent
7b645011c2
commit
cb2c691667
6 changed files with 85 additions and 131 deletions
|
@ -327,10 +327,11 @@
|
|||
});
|
||||
},
|
||||
queueTask(task) {
|
||||
this.pendingQueue =
|
||||
this.pendingQueue || new window.PQueue({ concurrency: 1 });
|
||||
const taskWithTimeout = textsecure.createTaskWithTimeout(task);
|
||||
this.pending = this.pending.then(taskWithTimeout, taskWithTimeout);
|
||||
|
||||
return this.pending;
|
||||
return this.pendingQueue.add(taskWithTimeout);
|
||||
},
|
||||
cleanSignedPreKeys() {
|
||||
const MINIMUM_KEYS = 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue