summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
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 /src/lib/ecore_con
parent9c3df02c4183974013a7d515740911341414f708 (diff)
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...
Diffstat (limited to 'src/lib/ecore_con')
-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
703 703
704 d->result = NULL; 704 d->result = NULL;
705 705
706 return ecore_thread_run(_efl_net_ip_resolve_async_run, 706 return ecore_thread_feedback_run(_efl_net_ip_resolve_async_run,
707 _efl_net_ip_resolve_async_end, 707 NULL,
708 _efl_net_ip_resolve_async_cancel, 708 _efl_net_ip_resolve_async_end,
709 d); 709 _efl_net_ip_resolve_async_cancel,
710 d, EINA_TRUE);
710 711
711 failed_hints: 712 failed_hints:
712 free(d->port); 713 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
1407 1407
1408 ctx->o = o; 1408 ctx->o = o;
1409 1409
1410 pd->libproxy_thread = ecore_thread_run(_efl_net_dialer_http_libproxy_run, 1410 pd->libproxy_thread = ecore_thread_feedback_run(_efl_net_dialer_http_libproxy_run,
1411 _efl_net_dialer_http_libproxy_end, 1411 NULL,
1412 _efl_net_dialer_http_libproxy_cancel, 1412 _efl_net_dialer_http_libproxy_end,
1413 ctx); 1413 _efl_net_dialer_http_libproxy_cancel,
1414 ctx, EINA_TRUE);
1414 return 0; 1415 return 0;
1415 url_error: 1416 url_error:
1416 free(ctx); 1417 free(ctx);