A Philosopher class that demonstrates per-session logging.
Inheritance Hierarchy
LaurelBridge.DCF.Examples.DiningPhilosophersWorkerThread
LaurelBridge.DCF.Examples.DiningPhilosophersPhilosopher
Namespace: LaurelBridge.DCF.Examples.DiningPhilosophers
Assembly: DiningPhilosophers (in DiningPhilosophers.exe) Version: DCF34 r11538 DCF_3_4_24_20190319
Syntax
C#
public class Philosopher : WorkerThread
The Philosopher type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Philosopher |
Constructor.
|
Methods
Name | Description | |
---|---|---|
Run |
Run method override.
(Overrides WorkerThreadRun.) |
Remarks
Each philosopher has a DicomSessionSettings instance. As a given philosopher does work, the log messages are written to a file whose filename corresponds to the SessionId property of that session. The log output will contain a log file for each session, as well as a default session log.
Credit for this dining philosophers solution goes to Bob Powell:
http://www.java2s.com/Tutorial/CSharp/0420__Thread/DiningPhilosopher.htm
Note |
---|
No philosophers were harmed in the implementation of this example. |
See Also