isn't it better to check in ecore_thread_cancel() if the thread was
already created?

On Wed, Sep 14, 2016 at 8:52 PM, Cedric BAIL <cedric.b...@free.fr> wrote:
> cedric pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=4d69f472fe31a9006436a05282a8376c7a712d41
>
> commit 4d69f472fe31a9006436a05282a8376c7a712d41
> Author: Cedric Bail <ced...@osg.samsung.com>
> Date:   Wed Sep 14 16:50:05 2016 -0700
>
>     eina: allow graceful failure when calling eina_thread_cancel with NULL.
> ---
>  src/lib/eina/eina_thread.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c
> index d40073a..5002a42 100644
> --- a/src/lib/eina/eina_thread.c
> +++ b/src/lib/eina/eina_thread.c
> @@ -230,6 +230,7 @@ eina_thread_name_set(Eina_Thread t, const char *name)
>  EAPI Eina_Bool
>  eina_thread_cancel(Eina_Thread t)
>  {
> +   if (!t) return EINA_FALSE;
>     return pthread_cancel((pthread_t)t) == 0;
>  }
>
>
> --
>
>



-- 
Gustavo Sverzut Barbieri
--------------------------------------
Mobile: +55 (16) 99354-9890

------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to