[libshumate] file-cache: Remove shumate_file_cache_purge_on_idle



commit 7c6cd5b8e9fbac870c7a79aec87e174837afbc25
Author: James Westman <james flyingpimonster net>
Date:   Wed May 19 22:21:38 2021 -0500

    file-cache: Remove shumate_file_cache_purge_on_idle
    
    It didn't work properly anyway, because it just delayed the blocking
    call.

 shumate/shumate-file-cache.c | 26 --------------------------
 1 file changed, 26 deletions(-)
---
diff --git a/shumate/shumate-file-cache.c b/shumate/shumate-file-cache.c
index cd2a7f7..87fa33f 100644
--- a/shumate/shumate-file-cache.c
+++ b/shumate/shumate-file-cache.c
@@ -617,32 +617,6 @@ delete_tile (ShumateFileCache *file_cache, const char *filename)
 }
 
 
-static gboolean
-purge_on_idle (gpointer data)
-{
-  shumate_file_cache_purge (SHUMATE_FILE_CACHE (data));
-  return FALSE;
-}
-
-
-/**
- * shumate_file_cache_purge_on_idle:
- * @file_cache: a #ShumateFileCache
- *
- * Purge the cache from the less popular tiles until cache's size limit is reached.
- * This is a non blocking call as the purge will happen when the application is idle
- */
-void
-shumate_file_cache_purge_on_idle (ShumateFileCache *file_cache)
-{
-  g_return_if_fail (SHUMATE_IS_FILE_CACHE (file_cache));
-  g_idle_add_full (G_PRIORITY_HIGH + 50,
-      (GSourceFunc) purge_on_idle,
-      g_object_ref (file_cache),
-      (GDestroyNotify) g_object_unref);
-}
-
-
 /**
  * shumate_file_cache_purge:
  * @file_cache: a #ShumateFileCache


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]