[geary/mjog/invert-folder-class-hierarchy: 32/72] Geary.ImapEngine.MinimalFolder: Remove closed_semaphore
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/invert-folder-class-hierarchy: 32/72] Geary.ImapEngine.MinimalFolder: Remove closed_semaphore
- Date: Wed, 3 Mar 2021 11:52:44 +0000 (UTC)
commit a2047bc11b66c91b7e1cda90892aebb441e7deaa
Author: Michael Gratton <mike vee net>
Date: Tue Feb 16 09:14:58 2021 +1100
Geary.ImapEngine.MinimalFolder: Remove closed_semaphore
Now that closing the folder waits for the replay queue to close, this
has no additional value.
src/engine/imap-engine/imap-engine-minimal-folder.vala | 10 ----------
1 file changed, 10 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine-minimal-folder.vala
b/src/engine/imap-engine/imap-engine-minimal-folder.vala
index 34c1d606a..1b952185d 100644
--- a/src/engine/imap-engine/imap-engine-minimal-folder.vala
+++ b/src/engine/imap-engine/imap-engine-minimal-folder.vala
@@ -103,7 +103,6 @@ private class Geary.ImapEngine.MinimalFolder : BaseObject,
private GLib.Cancellable remote_cancellable = new GLib.Cancellable();
private Imap.FolderSession? remote_session = null;
- private Nonblocking.Semaphore closed_semaphore = new Nonblocking.Semaphore();
private TimeoutManager update_flags_timer;
@@ -145,10 +144,6 @@ private class Geary.ImapEngine.MinimalFolder : BaseObject,
this.refresh_unseen_timer = new TimeoutManager.seconds(
REFRESH_UNSEEN_TIMEOUT_SEC, on_refresh_unseen
);
-
- // Notify now to ensure that wait_for_close_async does not
- // block if never opened.
- this.closed_semaphore.blind_notify();
}
/** {@inheritDoc} */
@@ -267,7 +262,6 @@ private class Geary.ImapEngine.MinimalFolder : BaseObject,
internal async void close() throws GLib.Error {
yield this.replay_queue.close();
yield close_remote_session();
- yield this.closed_semaphore.wait_async(null);
}
/**
@@ -371,9 +365,6 @@ private class Geary.ImapEngine.MinimalFolder : BaseObject,
cancellable.cancelled.connect(() => union_cancellable.cancel());
}
- // Reset to force waiting again in `close()`
- this.closed_semaphore.reset();
-
// Reset unseen count refresh since it will be updated when
// the remote opens - it's only used when the folder isn't
// being monitored.
@@ -806,7 +797,6 @@ private class Geary.ImapEngine.MinimalFolder : BaseObject,
yield this._account.release_folder_session(session);
}
- this.closed_semaphore.blind_notify();
}
private void on_email_complete(Gee.Collection<Geary.EmailIdentifier> email_ids) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]