Skip navigation

Manage multiple background threads

Manage multiple background threads: Android Development: Concurrent Programming
Manage multiple background threads: Android Development: Concurrent Programming

If you have multiple tasks or instances of a task to execute, you can line them up with something called a thread executor. This is part of the standard Java concurrency framework. There are other ways of doing the same thing, but the code for this is very simple. Start by creating a class that implements the Runnable interface. Put whatever code in its run() method you need to. In this case, do some logging and include a call to the sleep() method.

Resume Transcript Auto-Scroll
Skill Level Intermediate
1h 52m
Duration
11,274
Views
Show More Show Less
Skills covered in this course
Developer Mobile Apps Android

Continue Assessment

You started this assessment previously and didn't complete it. You can pick up where you left off, or start over.

Start Your Free Trial Now

Start your free trial now, and begin learning software, business and creative skills—anytime, anywhere—with video instruction from recognized industry experts.

Start Your Free Trial Now