[gnome-photos/wip/rishi/misc-fixes: 1/20] base-item, item-manager: Stop thumbnailing jobs during shutdown
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/misc-fixes: 1/20] base-item, item-manager: Stop thumbnailing jobs during shutdown
- Date: Sat, 26 Dec 2015 22:29:52 +0000 (UTC)
commit 28f4c47803f36a3b2b69ab9184aa0e346469ed90
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Dec 15 12:22:30 2015 +0100
base-item, item-manager: Stop thumbnailing jobs during shutdown
src/photos-base-item.c | 11 +++++++++++
src/photos-base-item.h | 2 ++
src/photos-item-manager.c | 2 ++
3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 97c16cd..e63d2b2 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -2018,6 +2018,17 @@ photos_base_item_set_favorite (PhotosBaseItem *self, gboolean favorite)
void
+photos_base_item_thumbnailing_stop (void)
+{
+ if (create_thumbnail_pool == NULL)
+ return;
+
+ g_thread_pool_free (create_thumbnail_pool, TRUE, TRUE);
+ create_thumbnail_pool = NULL;
+}
+
+
+void
photos_base_item_trash (PhotosBaseItem *self)
{
PhotosDeleteItemJob *job;
diff --git a/src/photos-base-item.h b/src/photos-base-item.h
index e1fb931..21e35a9 100644
--- a/src/photos-base-item.h
+++ b/src/photos-base-item.h
@@ -222,6 +222,8 @@ void photos_base_item_set_default_app_name (PhotosBaseItem *se
void photos_base_item_set_favorite (PhotosBaseItem *self, gboolean favorite);
+void photos_base_item_thumbnailing_stop (void);
+
void photos_base_item_trash (PhotosBaseItem *self);
G_END_DECLS
diff --git a/src/photos-item-manager.c b/src/photos-item-manager.c
index 1038adb..b13c9bf 100644
--- a/src/photos-item-manager.c
+++ b/src/photos-item-manager.c
@@ -410,6 +410,8 @@ photos_item_manager_dispose (GObject *object)
{
PhotosItemManager *self = PHOTOS_ITEM_MANAGER (object);
+ photos_base_item_thumbnailing_stop ();
+
if (self->collection_path != NULL)
{
photos_item_manager_collection_path_free (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]