Solutions for dining philosophers problem.
Implemented approaches:
make install
make build-app
./run-app.sh ATOMIC
Maven is used for building and packaging project.
There are several shortcuts for simplifying building and usage presented as Makefile.
To see all available shortcuts call make
from project root
(you need to have make installed).
If you want to run program from an IDE refer to DinnerApp.
If you want to run it from the console you have to package program first. There are two types of packaging:
The distributable program built by appassembler plugin
make build-app
./run-app.sh
and shaded "fat" JAR
make build-uberjar
./run-shaded.sh
During execution there would be several progressbars,
that would reflect how much time each philosopher spend on thinking/eating.
This progressbars may be displayed not properly sometimes (e.g. in IDE).
However, they look good in my Linux terminal (both X session and plain tty).
If you experience problems with it, you can use -NP
option to disable progressbar displaying.