LAUREL BRIDGE

Philosopher Class

DICOM Connectivity Framework V3.4
A Philosopher class that demonstrates per-session logging.
Inheritance Hierarchy

SystemObject
  LaurelBridge.DCF.Examples.DiningPhilosophersWorkerThread
    LaurelBridge.DCF.Examples.DiningPhilosophersPhilosopher

Namespace:  LaurelBridge.DCF.Examples.DiningPhilosophers
Assembly:  DiningPhilosophers (in DiningPhilosophers.exe) Version: DCF34 r10560 DCF_3_4_10
Syntax

C#
public class Philosopher : WorkerThread

The Philosopher type exposes the following members.

Constructors

  NameDescription
Public methodPhilosopher
Constructor.
Top
Methods

  NameDescription
Protected methodRun
Run method override.
(Overrides WorkerThreadRun.)
Top
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 Note
No philosophers were harmed in the implementation of this example.
See Also

Reference