On Tue, 1 May 2007 15:41:33 -0300 "Gustavo Sverzut Barbieri" <[EMAIL PROTECTED]> babbled:
> On 5/1/07, Andreas Volz <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I had to change my edje GUI from a thread. After some help here I found > > a way to do that with pipes. I've created some helper functions to easy > > dispatch an GUI update from a thread. Perhaps it's usefull for anyone. > > Maybe this functions or anything similar could be inserted in ecore for > > easier use in threads. > > I'm just started with EFL, being used to GLib, maybe this could be > also done by adding some timeout or idle function to be executed by > ecore, and since ecore processes these queues from the thread > ecore_main_loop_begin() (also considered "main" or "graphical" > thread), these would run from this. > > However, Ecore is not thread safe and this may bring some problems > using "as is", but providing a patch to use mutexes around critical > areas seems to be easy. Would it be accepted? If so I can provide > them.... since in few weeks I'll have to integrate GMainLoop with > ecore, this can help with the job, replacing GMainLoop primitives with > Ecore using LD_PRELOAD instead of the other way around (as I was > planing to do). i still think that mixing 2 mainloops is going to be a nightmare - even with adding some mutexes (so some of ecore is threadsafe, other bits are not - then evas and edje still are not). imho it is a bad idea to try and integrate the 2 main loops like this. the best way is to literally have each mainloop run in a thread (the main process thread or some other spawned thread - doesn't matter which one is where) and use fd pipes to send events/messages and communicate. this way each mainloop behaves 100% the same way it normally would and is not dependent on the other mainloop. all the assumptions the mainloops make stay the same. the fd's will let the select() calls wake up on signals as well as transport messages. do all ecore/evas/edje stuff in 1 loop thread and g-stuff in another. the emotion xine module does this as xine 1. loves to be multi-threaded (heavily) and forces you to use threads in using its api, and 2. can sometimes spend long times in stream open calls so these calls can block for a long time (sometimes a few seconds), so this is handled in child threads and emotion's main code simply manages messaging these threads and managing them. > -- > Gustavo Sverzut Barbieri > -------------------------------------- > Jabber: [EMAIL PROTECTED] > MSN: [EMAIL PROTECTED] > ICQ#: 17249123 > Skype: gsbarbieri > Mobile: +55 (81) 9927 0010 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
