summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-16 15:26:34 +0100
committerGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-16 15:26:34 +0100
commitd20384d4e61718b07c8ffa3c12009b270eb373cf (patch)
tree0a1024890856bdd2790b74713ef3e57d85d4347f
parentc3b49d1b553226b1f70b54063f20a508c7e63bb7 (diff)
Create event from main loop and not a thread.
-rw-r--r--src/lib/spy/spy_file.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/spy/spy_file.c b/src/lib/spy/spy_file.c
index 397862e..282c313 100644
--- a/src/lib/spy/spy_file.c
+++ b/src/lib/spy/spy_file.c
@@ -1,6 +1,15 @@
1#include "spy_private.h" 1#include "spy_private.h"
2 2
3static void 3static void
4_spy_file_event(void *data)
5{
6 Spy_Line *sl;
7
8 sl = data;
9 ecore_event_add(SPY_EVENT_LINE, sl, _spy_file_line_free, sl);
10}
11
12static void
4_spy_file_job(void *data) 13_spy_file_job(void *data)
5{ 14{
6 spy_file_poll(data); 15 spy_file_poll(data);
@@ -50,7 +59,7 @@ _spy_file_line_extract(Spy_File *sf)
50 59
51 sl->sf = sf; 60 sl->sf = sf;
52 sl->line = line; 61 sl->line = line;
53 ecore_event_add(SPY_EVENT_LINE, sl, _spy_file_line_free, sl); 62 ecore_main_loop_thread_safe_call_async(_spy_file_event, sl);
54 end: 63 end:
55 p = p1 + 1; 64 p = p1 + 1;
56 } 65 }