I don't come across work that requires much experience with multi-threading
. So I was wondering if anyone know of site (open source project) where I could take look at real world examples of some heavy duty code that takes care of thread pools
solves deadlock
situation, uses nonblocking algorithms
, reentrant locks
, join-fork
, futures-callables
well you get the idea.
To be more specific I'm looking for J2EE and MOM integration and messaging used between them.
A thread is automatically destroyed when the run() method has completed. But it might be required to kill/stop a thread before it has completed its life cycle. Previously, methods suspend(), resume() and stop() were used to manage the execution of threads.
Java has great support for multithreaded applications. Java supports multithreading through Thread class. Java Thread allows us to create a lightweight process that executes some tasks. We can create multiple threads in our program and start them.
The main way we can avoid such concurrency issues and build reliable code is to work with immutable objects. This is because their state cannot be modified by the interference of multiple threads. However, we can't always work with immutable objects.
These use everything you have mentioned and have the benfit of being quite well documented from a design point of view too.
JGroups, Jboss Cache and its successor Infinispan
Maybe have a look at the original Java java.util.concurrent package. That must be state of the art.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With