Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-08-04 Thread The Rasterman
On Thu, 4 Aug 2011 09:18:30 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said: On Fri, 29 Jul 2011, Vincent Torri wrote: On Fri, 29 Jul 2011 06:57:33 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said: Secondly, this code is disabled, so it shouldn't affect anything right

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-08-04 Thread The Rasterman
On Thu, 4 Aug 2011 11:49:59 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said: so, as discomfitor said, last year you removed some piece of code saying that it was too untested and the release being too close. There is the same case here, and you don't remove it... the other code was

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-08-01 Thread Cedric BAIL
On Fri, Jul 29, 2011 at 3:44 AM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/28/2011 10:35 PM, Cedric BAIL wrote: As I don't want the grumpy guy that don't help. You now have ecore_main_loop_thread_safe_call that should be the base for your patch. And I am still not convinced that we

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-08-01 Thread Cedric BAIL
On Mon, Aug 1, 2011 at 4:33 AM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/29/2011 05:56 PM, Cedric BAIL wrote: Then take that pseudo example : Eina_Bool _timer_in_main_loop(void *data) {    ;     lock_data_mutex();     if (!data_was_deleted)       {        free(data);    

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-31 Thread Mike McCormack
On 07/29/2011 05:56 PM, Cedric BAIL wrote: Then take that pseudo example : Eina_Bool _timer_in_main_loop(void *data) { ; lock_data_mutex(); if (!data_was_deleted) { free(data); } data_was_deleted = Eina_True; unlock_data_mutex(); return

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread Cedric BAIL
On Fri, Jul 29, 2011 at 3:44 AM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/28/2011 10:35 PM, Cedric BAIL wrote: As I don't want the grumpy guy that don't help. You now have ecore_main_loop_thread_safe_call that should be the base for your patch. And I am still not convinced that we

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread The Rasterman
On Wed, 27 Jul 2011 20:17:14 +0900 Mike McCormack mj.mccorm...@samsung.com said: it's 9pm on a friday night... and i don't think i'm going to get stuck into this right now. for now.. no one revert or do anything... i'll get to this tomorrow after some good sleep. :) Hi All, This patch adds

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread Rafael Antognolli
On Fri, Jul 29, 2011 at 5:56 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jul 29, 2011 at 3:44 AM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/28/2011 10:35 PM, Cedric BAIL wrote: As I don't want the grumpy guy that don't help. You now have ecore_main_loop_thread_safe_call that

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread Vincent Torri
On Fri, 29 Jul 2011, Rafael Antognolli wrote: On Fri, Jul 29, 2011 at 5:56 AM, Cedric BAIL cedric.b...@free.fr wrote: On Fri, Jul 29, 2011 at 3:44 AM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/28/2011 10:35 PM, Cedric BAIL wrote: As I don't want the grumpy guy that don't help.

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread The Rasterman
On Wed, 27 Jul 2011 15:08:21 +0200 Cedric BAIL cedric.b...@free.fr said: OK... quick comments: 1. adding threadsafety isnt bad. it's no worse than the thread checks NO ONe complained about. it's also optionally enabled, so i see no downside there. 2. yes - it's a pain in the butt to do, BUT if

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread The Rasterman
On Thu, 28 Jul 2011 14:31:53 +0200 Cedric BAIL cedric.b...@free.fr said: Before providing a benchmark, please revert your broken code and provide a working solution based on my discussion with gustavo (using Ecore_Pipe). Right know, and before doing benchmark, your solution doesn't work in

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread The Rasterman
On Fri, 29 Jul 2011 06:57:33 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said: Secondly, this code is disabled, so it shouldn't affect anything right now. As I understand, it's normal in EFL development to add code that is disabled, debug it, then enable it later when it works. no.

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread Vincent Torri
On Sat, 30 Jul 2011, Carsten Haitzler (The Rasterman) wrote: On Fri, 29 Jul 2011 06:57:33 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said: Secondly, this code is disabled, so it shouldn't affect anything right now. As I understand, it's normal in EFL development to add code that is

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread Vincent Torri
On Fri, 29 Jul 2011, Vincent Torri wrote: On Sat, 30 Jul 2011, Carsten Haitzler (The Rasterman) wrote: On Fri, 29 Jul 2011 06:57:33 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said: Secondly, this code is disabled, so it shouldn't affect anything right now. As I understand,

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-29 Thread Mike Blumenkrantz
On Fri, 29 Jul 2011 17:20:24 +0200 (CEST) Vincent Torri vto...@univ-evry.fr wrote: On Fri, 29 Jul 2011, Vincent Torri wrote: On Sat, 30 Jul 2011, Carsten Haitzler (The Rasterman) wrote: On Fri, 29 Jul 2011 06:57:33 +0200 (CEST) Vincent Torri vto...@univ-evry.fr said:

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Cedric BAIL
On Thu, Jul 28, 2011 at 7:20 AM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/27/2011 10:08 PM, Cedric BAIL wrote: So it will most of the time work, but in some racy case, not. Sounds to me like this doesn't change much from the current behaviour. I agree, it will work more often than

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Mike McCormack
On 07/28/2011 07:32 PM, Cedric BAIL wrote: Maybe stable, but the rendered scene will not make sense and be highly difficult to debug. So spank and point people to the right solution. This is ecore, not evas. Adding timers from a thread makes sense to me. I'm not proposing this as a solution

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Vincent Torri
On Thu, 28 Jul 2011, Mike McCormack wrote: On 07/28/2011 07:32 PM, Cedric BAIL wrote: Maybe stable, but the rendered scene will not make sense and be highly difficult to debug. So spank and point people to the right solution. This is ecore, not evas. Adding timers from a thread makes

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread David Seikel
On Thu, 28 Jul 2011 12:45:14 +1000 David Seikel onef...@gmail.com wrote: On Wed, 27 Jul 2011 15:08:21 +0200 Cedric BAIL cedric.b...@free.fr wrote: On Wed, Jul 27, 2011 at 1:17 PM, Mike McCormack mj.mccorm...@samsung.com wrote: This patch adds some level of thread safety to ecore. It

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Cedric BAIL
GRUMBL !!! On Thu, Jul 28, 2011 at 1:13 PM, Mike McCormack mj.mccorm...@samsung.com wrote: On 07/28/2011 07:32 PM, Cedric BAIL wrote: Maybe stable, but the rendered scene will not make sense and be highly difficult to debug. So spank and point people to the right solution. This is ecore, not

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Cedric BAIL
As I don't want the grumpy guy that don't help. You now have ecore_main_loop_thread_safe_call that should be the base for your patch. And I am still not convinced that we need more than that. People should just use that function when they are doing thread stuff and we should advertise it in our

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Mike McCormack
On 07/28/2011 08:18 PM, Vincent Torri wrote: I have already added code to print warnings. It helps, but the response is usually, but why isn't EFL thread safe? tell them to read the preamble there : http://docs.enlightenment.org/auto/ecore/Ecore_Main_Loop_Page.html Well, after repeating

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Mike McCormack
On 07/28/2011 09:31 PM, Cedric BAIL wrote: Before providing a benchmark, please revert your broken code and provide a working solution based on my discussion with gustavo (using Ecore_Pipe). Right know, and before doing benchmark, your solution doesn't work in all case and that's a no go for

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Mike McCormack
On 07/28/2011 10:35 PM, Cedric BAIL wrote: As I don't want the grumpy guy that don't help. You now have ecore_main_loop_thread_safe_call that should be the base for your patch. And I am still not convinced that we need more than that. People should just use that function when they are doing

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-28 Thread Vincent Torri
On Fri, 29 Jul 2011, Mike McCormack wrote: On 07/28/2011 09:31 PM, Cedric BAIL wrote: Before providing a benchmark, please revert your broken code and provide a working solution based on my discussion with gustavo (using Ecore_Pipe). Right know, and before doing benchmark, your solution

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-27 Thread Cedric BAIL
Hi, On Wed, Jul 27, 2011 at 1:17 PM, Mike McCormack mj.mccorm...@samsung.com wrote: This patch adds some level of thread safety to ecore. It does not add thread awareness (i.e. adding a timer from a thread will not wake a sleeping main loop). So it will most of the time work, but in some racy

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-27 Thread Gustavo Sverzut Barbieri
On Wed, Jul 27, 2011 at 10:08 AM, Cedric BAIL cedric.b...@free.fr wrote: Hi, On Wed, Jul 27, 2011 at 1:17 PM, Mike McCormack mj.mccorm...@samsung.com wrote: This patch adds some level of thread safety to ecore. It does not add thread awareness (i.e. adding a timer from a thread will not

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-27 Thread David Seikel
On Wed, 27 Jul 2011 15:08:21 +0200 Cedric BAIL cedric.b...@free.fr wrote: On Wed, Jul 27, 2011 at 1:17 PM, Mike McCormack mj.mccorm...@samsung.com wrote: This patch adds some level of thread safety to ecore. It does not add thread awareness (i.e. adding a timer from a thread will not wake

Re: [E-devel] [PATCH] ecore: Add basic thread safety

2011-07-27 Thread Mike McCormack
On 07/27/2011 10:08 PM, Cedric BAIL wrote: So it will most of the time work, but in some racy case, not. Sounds to me like this doesn't change much from the current behaviour. I agree, it will work more often than previously, but still hidding bug until it's to late. It is a change it goal.