Changed Task Philosopher

This commit is contained in:
romanschenk37 2022-04-07 14:03:18 +02:00
parent b5fc96ef94
commit 7dfa09a53e
1 changed files with 1 additions and 1 deletions

View File

@ -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();