Archive for the ‘Multithreading, Concurrency’ Category

Android Event Dispatch Thread or Main Thread – Tutorial

Posted October 12th, 2010 by
Summary

Android applications run in a native Linux process, in the underlying Linux OS. This process houses activities (screens), widgets, and services (non visual long running application parts). When working with Android apps, it is important to remember to keep long running code running in threads that are not tied to the main thread or event dispatch thread, in order to get an “application not responding” error. A common mistake that is made is long running tasks are performed in this EDT/main thread, and this leads to lots of application failures.

Click here to read this tutorial...   |  

Android XML View inflation Tutorial

Posted July 16th, 2008 by
Summary

This tutorial will show you how to instantiate or inflate a View from XML; this is useful for components that don’t provide a Java API to tweak with certain style attributes. The Button class is used as an example; you can only get certain styles to show up via XML that aren’t available via the Java API.

Click here to read this tutorial...   |  

Android – How to build a service-enabled Android app – Part 3/3 Multithreading

Posted June 4th, 2008 by
Summary

I’ve written 3 tutorials to show you how to create a service enabled Android application that performs all of it’s network I/O in a background thread (not the UI thread). These tutorials are split into three parts. This tutorial shows you how to use background threads to perform long running network IO operations, so that the main UI thread is not locked up.

Click here to read this tutorial...   |  

Task API (3 of 5) – Monitoring HTTP POST operations

Posted May 27th, 2008 by
Summary

Using Task API to perform HTTP POST operation in the background, while monitoring the request and response I/O operation data streams.

Click here to read this tutorial...   |  

Task API (2 of 5) – Task API in-depth

Posted April 8th, 2008 by
Summary

More details on the Task API introduced in the first Task API tutorial. SampleApp from the first tutorial is dissected under a microscope along with the API itself. Also contains information on which external libraries are optional and which are required.

Click here to read this tutorial...   |  

Task API (1 of 5) – Quick Start Guide

Posted April 6th, 2008 by
Summary

Introducing the Task API. Easy to use background task API for Swing. Android and JavaME implementation coming soon. Easily create tasks and monitor their progress and cancel them at any time. Easily manage multiple tasks. Create network aware tasks and recurring tasks, and much much more! The API is open source (Apache 2.0 license). Enjoy!!!

Click here to read this tutorial...   |  

SwingWorker details – canceling background tasks in flight

Posted November 9th, 2007 by
Summary

This tutorial outlines some of the interesting behaviors exhibitied by SwingWorker when running background tasks are cancelled in flight.

Click here to read this tutorial...   |  

Creating multi-threaded Swing apps that consume web services

Posted January 8th, 2007 by
Summary

If you’ve ever want to incorporate web services into your graphical applications/applets/widgets written in Java, then there are some threading issues that you have to be mindful of, and design around. This tutorial will guide you though some of the important threading issues you have to keep in mind when building such applications. The strategies outlined in this tutorial apply to accessing more than just web services from Swing apps; it also applies to loading information from databases, and performing any other kind of time consuming process that has to happen in the desktop app and interact with it, but can’t make the user interface unresponsive.

Click here to read this tutorial...   |  

Introduction to Java 5 java.util.concurrent API

Posted June 9th, 2006 by
Summary

Introduction to the Java5 Concurrency API

Click here to read this tutorial...   |  

Advanced Threads

Posted September 20th, 2000 by
Summary

Advanced threading topics.

Click here to read this tutorial...   |  

Introduction to Threads

Posted September 20th, 2000 by
Summary

Introduction to multithreading in Java.

Click here to read this tutorial...   |