On Thu, Dec 6, 2012 at 9:30 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> efl: thread safety by default.
>
>   it's better to test this case and make it the only one and make it
>   work, than have two options that may not work.

Grumbl. Did you read my remark ??? This code doesn't work and will
never work as advertised. It reduce the likeliness, or opportunity
windows, but doesn't make it safe. It will slow down all Ecore
operation by taking an unecessary lock and give nothing. I have always
advised to use the loop explicit lock with
ecore_thread_main_loop_begin and ecore_thread_main_loop_end, they do
explicitly lock the main loop and avoid all race condition. I am for
reverting this or remove the code.

> Author:       barbieri
> Date:         2012-12-05 16:30:46 -0800 (Wed, 05 Dec 2012)
> New Revision: 80290
> Trac:         http://trac.enlightenment.org/e/changeset/80290
>
> Modified:
>   trunk/efl/configure.ac trunk/efl/src/lib/ecore/ecore_private.h
>
> Modified: trunk/efl/configure.ac
> ===================================================================
> --- trunk/efl/configure.ac      2012-12-06 00:21:03 UTC (rev 80289)
> +++ trunk/efl/configure.ac      2012-12-06 00:30:46 UTC (rev 80290)
> @@ -1953,20 +1953,6 @@
>     ],
>     [want_g_main_loop="no"])
>
> -# thread safety
> -
> -AC_ARG_ENABLE([thread-safety],
> -   [AC_HELP_STRING([--enable-thread-safety],
> -       [enable thread safety. @<:@default=disabled@:>@])],
> -   [
> -    if test "x${enableval}" = "xyes" ; then
> -       want_thread_safety="yes"
> -    else
> -       want_thread_safety="no"
> -    fi
> -   ],
> -   [want_thread_safety="no"])
> -
>  # epoll
>
>  AC_ARG_ENABLE([epoll],
> @@ -1994,10 +1980,6 @@
>     want_glib="yes"
>  fi
>
> -if test "x${want_thread_safety}" = "xyes" ; then
> -   AC_DEFINE([HAVE_THREAD_SAFETY], [1], [Define to enable thread safety])
> -fi
> -
>  want_ecore_timer_dump="no"
>  if test "x${build_profile}" = "xdebug" && test "x${ac_cv_func_backtrace}" = 
> "xyes"; then
>     want_ecore_timer_dump="yes"
> @@ -4184,7 +4166,6 @@
>  echo
>
>  echo "Ecore:"
> -echo "  Thread safety..............: $want_thread_safety"
>  echo "  GLib support...............: $with_glib"
>  echo "  Use g_main_loop............: $want_g_main_loop"
>  echo "  Gathering memory statistic.: $ac_cv_func_mallinfo"
>
> Modified: trunk/efl/src/lib/ecore/ecore_private.h
> ===================================================================
> --- trunk/efl/src/lib/ecore/ecore_private.h     2012-12-06 00:21:03 UTC (rev 
> 80289)
> +++ trunk/efl/src/lib/ecore/ecore_private.h     2012-12-06 00:30:46 UTC (rev 
> 80290)
> @@ -246,12 +246,7 @@
>  static inline void
>  _ecore_lock(void)
>  {
> -#ifdef HAVE_THREAD_SAFETY
>     eina_lock_take(&_ecore_main_loop_lock);
> -#else
> -   /* at least check we're not being called from a thread */
> -   EINA_MAIN_LOOP_CHECK_RETURN;
> -#endif
>     _ecore_main_lock_count++;
>     /* assert(_ecore_main_lock_count == 1); */
>  }
> @@ -261,9 +256,7 @@
>  {
>     _ecore_main_lock_count--;
>     /* assert(_ecore_main_lock_count == 0); */
> -#ifdef HAVE_THREAD_SAFETY
>     eina_lock_release(&_ecore_main_loop_lock);
> -#endif
>  }
>
>  /*
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>



--
Cedric BAIL

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to