* src/engine/imap/transport/imap-client-session-manager.vala
(ClientSessionManager): Use a non-blocking queue for free sessions
rather than a set of reserved sessions, so we can instantly pick a free
one when needed and available. Manage establishing new connections from
one place in check_pool (was adjust_session_pool) rather than in a few
different places in the class. Greatly simply lock management and
connection establishment code. Add some doc comments, clean up code
organisation.
* src/engine/imap/transport/imap-client-session-manager.vala
(ClientSessionManager): Rework close_async() and force_disconnect_all()
to use the same code for closing all sessions. When a session is closed
by some other means then simply remove it, rather than going through
force_disconnect() again. Remove force_disconnect()'s do_disconnect
param, since all call sites now set it to true, and just always attempt
to disconnect the session, without waiting for it.
This updates the client session manager to close IMAP connections without
waiting when they are released and the account is closing, rather than
adding them back to the pool again. Sessions that are in the Selected
state due to being used by a folder are also simply closed, rather than
attempting to return them to Authenticated (i.e. not selected) state
first.
This means when a folder is closed and releases its session that it does
not block if its session has hung, making application shutdown less
likely to hang as well, helping Bug 745561 along a bit further.
* src/engine/nonblocking/nonblocking-abstract-semaphore.vala: Renamed to
nonblocking-lock.vala, rename class from AbstractSemaphore to Lock and
update subclasses, since it is used as a basis for a number of
different lock implementations. Make two getter methods into read-only
properties. Fill out doc comments to be much more comprehensive.
* src/engine/nonblocking/nonblocking-mutex.vala (Mutex): Provide a
high-level API and update documentation comments.
* src/engine/nonblocking/nonblocking-queue.vala (Queue): Add to doc
comments.
* src/engine/nonblocking/nonblocking-variants.vala: Actually document
how each of the variants behave.
* src/client/application/geary-application.vala (Application): Use "help"
and yelp for showing help, rather than old "ghelp" URI and gnome-help.
* help/CMakeLists.txt: Update CMake build to match Meson
* meson.build: Use libunwind and libunwind-generic to avoid having to
search for the platform-specific lib.
* src/meson.build: Set UNW_LOCAL_ONLY define to get the most optimal
unwind impl.
* src/engine/imap-engine/imap-engine-minimal-folder.vala
(MinimalFolder.start_open_remote): Don't check to see if the timer is
running before opening the remote, just do it since this method is only
called when the remote should be opened.
(MinimalFolder.on_remote_ready): Only start opening the remote if
actually needed.
* src/engine/imap-engine/imap-engine-minimal-folder.vala
(MinimalFolder.start_open_remote): Don't check to see if the timer is
running before opening the remote, just do it since this method is only
called when the remote should be opened.
(MinimalFolder.on_remote_ready): Only start opening the remote if
actually needed.
This lets valadoc build Geary's engine docs again as long as patches for
valadoc Bug 736483 and Bug 646982 are applied (which will hopefully be
merged for vala 0.40). Once Bug 792349 is also fixed, we'll be able to
generate private docs as well.
Since we are now noticing unsolicited FETCH data when open, we don't need
to periodically run the flag watcher — it only needs to be run when first
opening a folder, so do it then.
* src/engine/imap-engine/imap-engine-minimal-folder.vala (MinimalFolder):
Move main flag watcher operation here, call it once the folder's remote
has opened. Remove use of EmailFlagWatcher.
* src/engine/imap-engine/imap-engine-email-flag-watcher.vala: Removed, no
longer used.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala: Replace
the account synchronizer's queue and operations with two account
operations, one for simply refreshing folders and one for extanding the
vector back to the prefetch epoch.
* src/engine/imap-engine/imap-engine-minimal-folder.vala (MinimalFolder):
Tell the prefetcher we've opened once the open count as incremented,
rather than when the remote is connected, so it isn't signalled
multiple times and hence doesn't add multiple listeners.