Diese Applikation wurde im Verlauf einer Bachelorarbeit an der Hochschule Landshut erstellt. Sie dient dazu, anhand verscheidener Bespeiele eine Einführung in das Multithreading zu gebeb.
src/main/java/com/multithreading/
├── MultithreadingMain.java # Main application entry point
└── examples/
├── BasicThreadExample.java # Basic thread creation methods
├── ThreadExample.java # Simple thread example
├── Thread_Beispiel.java # German thread example
├── ThreadPoolExample.java # Thread pool demonstrations
├── SynchronizationExample.java # Synchronization mechanisms
├── ProducerConsumerExample.java # Producer-Consumer pattern
└── ConcurrentCollectionsExample.java # Thread-safe collections
- Extending Thread class
- Implementing Runnable interface
- Using lambda expressions
- Thread lifecycle management
- Fixed thread pools
- Cached thread pools
- Single thread executors
- Scheduled executors
- Race condition demonstration
- Synchronized methods and blocks
- Volatile keyword usage
- Lock mechanisms
- BlockingQueue implementation
- Multiple producers and consumers
- Thread coordination
- ConcurrentHashMap
- CopyOnWriteArrayList
- Various BlockingQueue implementations
javac -d . src/main/java/com/multithreading/**/*.javajava com.multithreading.MultithreadingMainjava com.multithreading.examples.ThreadExample
java com.multithreading.examples.Thread_Beispiel- Java 8 or higher
- No external dependencies required
This project helps understand:
- Thread creation and management
- Thread safety and synchronization
- Performance considerations in multithreading
- Common threading patterns and best practices
- Java concurrency utilities
- All examples include proper exception handling
- Comments are provided in both German and English
- Code demonstrates both basic and advanced threading concepts
- Examples are designed to be educational and easy to understand