From 7dfa09a53ef8bfc8d1a97a022c0278f8d326d9ac Mon Sep 17 00:00:00 2001 From: romanschenk37 <84532681+romanschenk37@users.noreply.github.com> Date: Thu, 7 Apr 2022 14:03:18 +0200 Subject: [PATCH] Changed Task Philosopher --- .../src/main/java/ch/zhaw/prog2/philosopher/ForkManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Philosopher/src/main/java/ch/zhaw/prog2/philosopher/ForkManager.java b/code/Philosopher/src/main/java/ch/zhaw/prog2/philosopher/ForkManager.java index 6c2fa22..5983b61 100644 --- a/code/Philosopher/src/main/java/ch/zhaw/prog2/philosopher/ForkManager.java +++ b/code/Philosopher/src/main/java/ch/zhaw/prog2/philosopher/ForkManager.java @@ -46,7 +46,7 @@ class ForkManager { Fork rightFork = rightFork(philosopherId); // acquire forks sequentially while(!(leftFork.getState() == FREE && rightFork.getState() == FREE)){ - forkDelay(); + forkDelay(); //wait if not both forks are available } leftFork.acquire(philosopherId); forkDelay();