Wednesday, July 27, 2011

[android-developers] Re: FutureTask cancel issue

Hi,
I'm not handling interrupt correctly, but the only way is to add
Thread.sleep(1); and waste processor time to allow thread
interruption?
Thanks for your response.


On Jul 27, 3:38 am, gjs <garyjamessi...@gmail.com> wrote:
> Hi,
>
> Are you handling interrupt correctly ?
>
> http://www.coderanch.com/t/514246/threads/java/Stopping-thread-thread...
>
> Regards
>
> On Jul 27, 12:54 am, pml <pablolov...@gmail.com> wrote:
>
>
>
> > I'm trying to stop aFutureTask, calling its cancel() method, the call
> > returns true, that means the task was canceled, but the thread running
> > the task continues running until termination. I've tested my
> > application on Android 2.3.3 because I read that there are a race in
> > the cancel() on android before 2.3, but it's like the problem still on
> > 2.3.3.
> > Can everybody explain me what was the race in cancel() or how may I
> > kill the thread runing aFutureTask?
>
> > Thanks!- Hide quoted text -
>
> - Show quoted text -

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate