Mark Murphy wrote:
> Ben Williamson wrote:
>
>> I sense a bit of sarcasm in the first part, I know they have been
>> depricated, but I don't work with threads much and I've never needed to
>> pause one (but throwing in Android's activity structure brings up that
>> need).
>>
>
> Sorry -- it's just that this isn't a new problem.
>
>
>> What you explained about the job queue makes much more sense than what I
>> was trying accomplish. Sometimes you just need someone to bounce off of,
>> sorry if I _annoyed_ you with my ignorance :). I'm no longer ignorant on
>> the matter thanks to yourself!
>>
>
> Again, I apologize for my tone.
>
>
Hey no problem, you were very helpful though, thanks. In fact here is a
prototyped version of where I'm going now... Works swimmingly!
//global declarations
private int i = 0;
private int b = 0;
taskQueue = new TaskQueue();
while (i < 100000) {
taskQueue.addTask(new Runnable() {
public void run() {
Log.e("Counting", String.valueOf(b));
b++;
}
});
i++;
}
taskQueue.start();
The TaskQueue houses a LinkedList filled with Runnables. Works alot
better than actually looping inside the task... I'm sure I can clean
this up a bit more by subclassing the Runnable object, this was just a
proof of concept to see if it worked on the phone.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---