[geary/mjog/folder-load-sync-race: 2/6] Geary.ImapEngine.AccountProcessor: Support dequeing account ops
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/folder-load-sync-race: 2/6] Geary.ImapEngine.AccountProcessor: Support dequeing account ops
- Date: Mon, 8 Feb 2021 14:07:11 +0000 (UTC)
commit efca5fb021c15929ee7f9357b6e5bd48dea06360
Author: Michael Gratton <mike vee net>
Date: Tue Feb 9 00:59:00 2021 +1100
Geary.ImapEngine.AccountProcessor: Support dequeing account ops
src/engine/imap-engine/imap-engine-account-processor.vala | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/engine/imap-engine/imap-engine-account-processor.vala
b/src/engine/imap-engine/imap-engine-account-processor.vala
index 44e0353fc..0e5cc2f02 100644
--- a/src/engine/imap-engine/imap-engine-account-processor.vala
+++ b/src/engine/imap-engine/imap-engine-account-processor.vala
@@ -68,6 +68,16 @@ internal class Geary.ImapEngine.AccountProcessor :
}
}
+ public void dequeue(AccountOperation op) {
+ if (this.current_op != null &&
+ this.current_op.equal_to(op) &&
+ this.op_cancellable != null) {
+ this.op_cancellable.cancel();
+ this.op_cancellable = null;
+ }
+ this.queue.revoke(op);
+ }
+
public void stop() {
this.is_running = false;
if (this.op_cancellable != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]