summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-04-09 11:44:29 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit8f17ab22acdfae701423b018c5ed5219f3badf71 (patch)
tree41348a282d4c32d7ac95247b43d9130cf290fdd5 /src/lib/eio
parentc0bcd3259189aa2f8d85b1cdd86b58d8ecfdaa25 (diff)
eio: handle future cancellation properly for Efl.Io.Manager.
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/efl_io_manager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index d350331bc2..2320394531 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -66,7 +66,8 @@ _future_file_error_cb(void *data,
66{ 66{
67 Eina_Promise *p = data; 67 Eina_Promise *p = data;
68 68
69 eina_promise_reject(p, error); 69 // error == 0 -> promise was cancelled, no need to reject it anymore
70 if (error != 0) eina_promise_reject(p, error);
70} 71}
71 72
72/* Basic listing callbacks */ 73/* Basic listing callbacks */
@@ -97,6 +98,7 @@ _future_file_info_cb(void *data EINA_UNUSED, Eio_File *handler, Eina_Array *gath
97 Eio_File_Direct_Info *d; 98 Eio_File_Direct_Info *d;
98 99
99 if (!info) goto end; 100 if (!info) goto end;
101 if (ecore_thread_check(handler->thread)) goto end;
100 102
101 info(info_data, gather); 103 info(info_data, gather);
102 104