raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=eab798c753e72eece526ceccf3c9beb441b5f5ff

commit eab798c753e72eece526ceccf3c9beb441b5f5ff
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Fri Feb 3 14:57:49 2017 +0900

    ecore_con/efl_net - dedicated threads for network i/o not from the pool
    
    so ecore_con/efl_net were using the standard ecore_thread thread pool
    for doing things like dns lookups (that can take multiple minutes
    until timeouts) and actual http transactions. similarly they can block
    thread workers for long periods or indefinitely thus basically
    blocking the whole eocre_thread pool and stopping others from sharing
    it. the best solution we have right now is to bypass the thread pool
    queue and have dedicated threads for these actions. what we should
    have is a dedicated thread pool with each thread taking on N
    connections (via select etc.) and the ability to create and destroy
    thread pools for specific tasks so you can separate the work out from
    other work.  but that is basically a redesign of our thread pool infra
    so let's do the quick solution here until that day comes.
    
    this partially addresses D4640
    
    a dedicated thread per image load though is going to be a lot nastier...
---
 src/lib/ecore_con/ecore_con.c           | 9 +++++----
 src/lib/ecore_con/efl_net_dialer_http.c | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index dd641da..35eb4d0 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -703,10 +703,11 @@ efl_net_ip_resolve_async_new(const char *host, const char 
*port, const struct ad
 
    d->result = NULL;
 
-   return ecore_thread_run(_efl_net_ip_resolve_async_run,
-                           _efl_net_ip_resolve_async_end,
-                           _efl_net_ip_resolve_async_cancel,
-                           d);
+   return ecore_thread_feedback_run(_efl_net_ip_resolve_async_run,
+                                    NULL,
+                                    _efl_net_ip_resolve_async_end,
+                                    _efl_net_ip_resolve_async_cancel,
+                                    d, EINA_TRUE);
 
  failed_hints:
    free(d->port);
diff --git a/src/lib/ecore_con/efl_net_dialer_http.c 
b/src/lib/ecore_con/efl_net_dialer_http.c
index 2454c72..6c4a463 100644
--- a/src/lib/ecore_con/efl_net_dialer_http.c
+++ b/src/lib/ecore_con/efl_net_dialer_http.c
@@ -1407,10 +1407,11 @@ _efl_net_dialer_http_efl_net_dialer_dial(Eo *o, 
Efl_Net_Dialer_Http_Data *pd, co
 
         ctx->o = o;
 
-        pd->libproxy_thread = 
ecore_thread_run(_efl_net_dialer_http_libproxy_run,
-                                               
_efl_net_dialer_http_libproxy_end,
-                                               
_efl_net_dialer_http_libproxy_cancel,
-                                               ctx);
+        pd->libproxy_thread = 
ecore_thread_feedback_run(_efl_net_dialer_http_libproxy_run,
+                                                        NULL,
+                                                        
_efl_net_dialer_http_libproxy_end,
+                                                        
_efl_net_dialer_http_libproxy_cancel,
+                                                        ctx, EINA_TRUE);
         return 0;
      url_error:
         free(ctx);

-- 


Reply via email to