On Mon, Nov 3, 2008 at 3:42 AM, Enlightenment SVN
<[EMAIL PROTECTED]> wrote:
> Log:
>  add patch to add a pipe handler for glueing threads to the core main loop via
>  pipes - makes it save for a thread to send a message to the main loop and not
>  need lots of thread locks etc.

ok, this code have some minor problems, I should have looked at it
before, maybe I can fix it during my flight tomorrow, but:
  - read/write need to catch errors, be them EINTR and EAGAIN since fd
is marked non-blocking. For EAGAIN we could either just retry or we
must keep size and "todo" in Ecore_Pipe as well as an allocated buffer
of required size, just dispatch when everything is read. (same for
write).
  - for consistency, we should have handler() to return an int and
return that int in _ecore_pipe_read().
  - example contais code that does not even compile, I spotted at
least "ecore_pipe_write(pipe, arg0);" but that function takes 3
parameters, last one must be sizeof(void *) since you're writing the
pointer, but possible more stuff is missing.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to