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.  The goal will be to make ecore calls thread safe,
and any non-thread safe behavior is a bug.

> People should never use things they don't understand... and so few
> people understand threads. Just one question, do they use ecore_thread
> or there own stuff ?

I disagree with "people should never use things they don't understand".

The whole point of a library or any other programming abstraction is
to hide details and save people reimplementing these things over and over
themselves.

Some developers in Samsung use ecore_thread, and some don't.  Honestly,
ECORE_MAIN_LOOP_ASSERT has shown up quite a few problems with code.
Though the majority of developers understand that EFL code should be
single threaded, there are still many crashes due to threading issues.
I think EFL will be seen as "more stable" if it is thread safe... thus
these patches.

> You can't make it work sanely, how are you planning to synchronize the
> rendering state with your request from a thread. It's just not

Let's stick to technical stuff rather than abstract ideas like sanity.

I'm only talking about ecore here.  Step by step... (Raster has big plans
for the rendering engine involving threads.)

If the code is lacking in one area or the other, please point it out.
(Actually, some big bits, like locks around the idlers are missing from
the patch I sent.)

> I clearly disagree on that patch going in (and I am still not
> discussing the issue of performance here).

Well three points:

* nobody complained when I added checks to show that ecore calls are coming
  from the same thread, even though the performance "impact" would be 
comparable.
  (See ECORE_MAIN_LOOP_ASSERT)

* given that SMP is widely available these days, I would think that
  enabling simple thread based programming could dramatically improve
  performance of some code.

* I will provide a way to switch off thread safety at build time

Right now my thoughts are:

* support single main loop only
* add support for waking the main loop when timers, fds, etc. are added

thanks,

Mike

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to