summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-03 14:57:49 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-03 14:57:49 +0900
commiteab798c753e72eece526ceccf3c9beb441b5f5ff (patch)
tree0c5694dbddc17f342155d96544523f78fffec494
parent9c3df02c4183974013a7d515740911341414f708 (diff)
downloadefl-eab798c753e72eece526ceccf3c9beb441b5f5ff.tar.gz
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...
-rw-r--r--src/lib/ecore_con/ecore_con.c9
-rw-r--r--src/lib/ecore_con/efl_net_dialer_http.c9
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 dd641da479..35eb4d091f 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 2454c7223a..6c4a463a12 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);