ecore: actually limit the number of pipe in the cache.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 28 Jun 2011 14:53:34 +0000 (14:53 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 28 Jun 2011 14:53:34 +0000 (14:53 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@60763 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore/ecore_thread.c

index 5c62e33..027da74 100644 (file)
@@ -420,7 +420,10 @@ _ecore_thread_pipe_free(void *data __UNUSED__, void *event)
 {
    Ecore_Pipe *p = event;
 
-   eina_array_push(_ecore_thread_pipe, p);
+   if (eina_array_count_get(_ecore_thread_pipe) < 50)
+     eina_array_push(_ecore_thread_pipe, p);
+   else
+     ecore_pipe_del(p);
    eina_threads_shutdown();
 }