Tag archives for Synchronization

Java: Atomic integer example
After my post 'ThreadLocal, what is it?' I would write some words about the java.util.concurrent.atomic package that contains a small toolkit of classes supporting lock-free thread-safe programming on single variables. We will compare in this example the 3 types of shared counters: - a simple counter without synchronization or lock, - an advanced counter with synchronization, - an atomic counter without synchronization or lock ...more»
Java: Multi tasks, Multi threading, Synchronization, Semaphore, Mutex, Barrier
Hi, This post concerns the multi-tasking or multi-threading which is a programming technique to take advantage of the use of tasks (threads). We will see in this tutorial the practical implementation of a multi-tasking. Firstly, to define what the multi-tasking, I propose several examples within an application: the GUI can start a thread to load a image while it continues to process events ...more»
Copyright ® 2012 Hüseyin Özveren. No reproduction, even partial, can be used from this site and all its contents including text, documents, images, etc.. without the express permission of the author.