search: Rework threading

Search uses GcalTimeline, an object that is meant to be single
threaded, in multple threads. That mostly worked okay because
GcalTimeline mostly relies on GcalCalendarMonitor, which is
heavily threaded. But, sometimes it failed.

Rework that to be single-threaded, and asynchronous.

Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/981
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/987
Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/988
This commit is contained in:
Georges Basile Stavracas Neto
2023-03-16 12:27:47 +00:00
parent f751803e07
commit daec07c9f6
3 changed files with 101 additions and 85 deletions
+7 -1
View File
@@ -33,6 +33,12 @@ GcalSearchModel* gcal_search_model_new (GCancellable
GDateTime *range_end);
void gcal_search_model_wait_for_hits (GcalSearchModel *self,
GCancellable *cancellable);
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean gcal_search_model_wait_for_hits_finish (GcalSearchModel *self,
GAsyncResult *result,
GError **error);
G_END_DECLS