Skip to content

Latest commit

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

concurrent-java

Multi-threads programing philosophy in java.

Summary

Each package contains some concept-specified questions and my solution.

#packagedescriptionconcept
1bankTransfer money to each other in different accountsdata race; race condition; dead lock
2philosopherDining philosopher problemdata race; race condition; dead lock
3producerconsumerProducer-consumer problemsemaphore; conditional variable; BlockingQueue
4observerThread-safety observer patternobserver pattern; defensive copy; copy on write; EventBus
5optionalAn elegant alternative to nullOptional; null
6completableFuturecomposable asynchronous programingCompletableFuture
7blockqueueA thread-safety queueBlockingQueue; conditional variable
8timerA data structure to execute task at specific timetimer; BlockingQueue
9eventloopAn event-driven asynchronous programing modelevent loop; non-blocking I/O; NIO
10singletonImplementation of Singleton patternsingleton pattern; memory model; volatile
11guavaguava exampleutilities; collections; caches; concurrency; networking; hashing...

Motivation

My friend is new to java concurrency programing, so I set up this project to help him to have a better knowledge about how to code in multi-threads environment. This project takes advantage of several awesome books such as Java Concurrency in Practice , Effective Java and extracts the most important concept of concurrency programing. What's more, it demonstrates the usage of some popular utils including guava and rxjava. Feel free to enjoy it.

I will continue to post updates.

Getting Started

Prerequisites

Java 8
Maven

Building

cd concurrent-java
mvn clean package

License

This project is licensed under the MIT License - see the LICENSE.txt file for details

About

Multi-threads programing philosophy in java.

Topics

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages