Skip to content

kennylbj/concurrent-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

concurrent-java

Multi-threads programing philosophy in java.

Summary

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

# package description concept
1 bank Transfer money to each other in different accounts data race; race condition; dead lock
2 philosopher Dining philosopher problem data race; race condition; dead lock
3 producerconsumer Producer-consumer problem semaphore; conditional variable; BlockingQueue
4 observer Thread-safety observer pattern observer pattern; defensive copy; copy on write; EventBus
5 optional An elegant alternative to null Optional; null
6 completableFuture composable asynchronous programing CompletableFuture
7 blockqueue A thread-safety queue BlockingQueue; conditional variable
8 timer A data structure to execute task at specific time timer; BlockingQueue
9 eventloop An event-driven asynchronous programing model event loop; non-blocking I/O; NIO
10 singleton Implementation of Singleton pattern singleton pattern; memory model; volatile
11 guava guava example utilities; 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

Releases

No releases published

Packages

No packages published

Languages