On Thu, Sep 8, 2011 at 2:44 AM, Li SuXia <[email protected]> wrote:
> Sorry for reply late, the sample is very simple.
> 1. create 1st thread by ecore_thread_run, then cancel it.
> 2. create 2nd thread by ecore_thread_feedback_run, crash happened after it 
> end.

Interesting, will try to reproduce it here.

> And we also find another problem, here is the cases:
> 1. create 1st thread by ecore_thread_run, it keep running,
> 2. create 2nd thread by ecore_thread_run, it doesn't start at all, except the 
> 1st thread end, why ?

ecore_thread_run are designed to be short task running in a pool. If
you have only one CPU, the pool will only be able to run one task
after another. So the second one is queued until you leave it, as it
is not, the 2nd job is not started. That's why we have
ecore_thread_feedback_run to run outside of the pool as it may be
needed for some kind of workload.

> Another issues, if we create the 2nd thread, then cancel it, then repeat 
> create & cancel operation,
> Sometimes crash after thread_cancel cb. But even we do nothing in cancel_cb.

Ok, will see if I can reproduce it and try to fix the bug.

Thanks for the bug report,

> -----邮件原件-----
> 发件人: Cedric BAIL [mailto:[email protected]]
> 发送时间: 2011年9月6日 16:16
> 收件人: Enlightenment developer list
> 主题: Re: [E-devel] 答复: Questions about ecore_thread_feedback_run
>
> Hi,
>
> Could you send me an example of the code that trigger the issue ? No problem 
> if you send it directly to me. So I can understand what is going on.
>
> Thanks,
>
> 2011/9/6 Li SuXia <[email protected]>:
>> Hi, I tied as you said, remove the '!' in
>> ecore/src/lib/ecore/ecore_thread.c
>> at line 1099 and use EINA_TRUE for try_no_queue. The first time, the
>> thead works well, but the second time, the BS happened after thread end.
>> I try do nothing in thread and end, it also crahsed. We try
>> ecore_thread_run, no crash. Could you please help me for this? Thanks~
>>
>> -----邮件原件-----
>> 发件人: Cedric BAIL [mailto:[email protected]]
>> 发送时间: 2011年9月3日 16:54
>> 收件人: Enlightenment developer list
>> 主题: Re: [E-devel] Questions about ecore_thread_feedback_run
>>
>> Hi,
>>
>> On Sat, Sep 3, 2011 at 3:25 AM, suxia li <[email protected]> wrote:
>>> Hi there, here i have a weired problem. i create 2 threads by
>> ecore_thread_feedback_run, the try_no_queue are both set as EINA_TRUE.
>> the second one is run after the 1st one end, but the second one does
>> run? i try to change the second one by ecore_thread_run, it works.
>>> and i also try to change the try_no_queue of second one as
>>> EINA_FALSE, it
>> also run.
>>> but i don't understand the problem, who can help explain it?
>>
>> We have a bug either in the doc or in the code. I just checked and
>> try_no_queue should be set to EINA_FALSE to mean don't use the thread pool.
>> I think that the doc is right and that the behaviour you want with
>> EINA_TRUE, should be fixed accordingly. I will shortly fix it. I don't
>> know how I didn't spot it earlier. If you want to fix it locally, just
>> open ecore/src/lib/ecore/ecore_thread.c at line 1099 and remove the '!'.
>> --
>> Cedric BAIL
>>
>> ----------------------------------------------------------------------
>> ------
>> --
>> Special Offer -- Download ArcSight Logger for FREE!
>> Finally, a world-class log management solution at an even better price-free!
>> And you'll get a free "Love Thy Logs" t-shirt when you download Logger.
>> Secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsisghtdev2dev
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>> ----------------------------------------------------------------------
>> -------- Special Offer -- Download ArcSight Logger for FREE!
>> Finally, a world-class log management solution at an even better
>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>> download Logger. Secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsisghtdev2dev
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>
>
>
> --
> Cedric BAIL
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better price-free! 
> And you'll get a free "Love Thy Logs" t-shirt when you download Logger. 
> Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> ------------------------------------------------------------------------------
> Doing More with Less: The Next Generation Virtual Desktop
> What are the key obstacles that have prevented many mid-market businesses
> from deploying virtual desktops?   How do next-generation virtual desktops
> provide companies an easier-to-deploy, easier-to-manage and more affordable
> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
Cedric BAIL

------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to