On Mon, 14 Sep 2009 13:18:28 -0400 Atton Jonathan <jonathan.at...@gmail.com>
said:

hmm while i see the point of this... it's convenient. it's a bit simple, but
then again a more complex queue with N messages on the pipe can be implemented
co-operatively with the thread suspending itself once N items are in the queue.
when they are handled in the pipe handler the main loop decrements queue count
and unsuspends thread (cond_wait in pthreads is good for this).

what i'm wondering is.. if this is your intended behavior just with a limited
subset of 1 item in the queue? if so maybe this is better done as an N item
queue with proper infrastructure of suspend/resume of the thread?

> hey,
> 
> The attached patch add the method ecore_pipe_read() to ecore.
> 
> During the creation of the Ecore_Pipe the handler can be null. In this case
> the readable side of the pipe will block. I use it to pause a thread during
> an operation.
> The thread send a data to the main_loop with a pipe. Then the thread use
> ecore_pipe_read() and will block. When the main loop has terminate his
> operation, it write a data in the pipe and the thread is unblock.
> Consequently the main loop can works on a data used by the thread as the
> thread is in pause.
> 
> 
> Please review the patch, maybe you want to do this in an other way.
> 
> -- 
> Regards.
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to