Skip to content

Commit 5b3f3c4

Browse files
Update main.swift
1 parent 4daf0d0 commit 5b3f3c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DiningPhilosophers/Sources/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Dispatch
1212

1313
let numberOfPhilosophers = 4
1414

15-
class ForkPair {
15+
struct ForkPair {
1616
static let forksSemaphore:[DispatchSemaphore] = Array(repeating: DispatchSemaphore(value: 1), count: numberOfPhilosophers)
1717

1818
let leftFork: DispatchSemaphore
@@ -44,7 +44,7 @@ class ForkPair {
4444
}
4545

4646

47-
class Philosophers {
47+
struct Philosophers {
4848
let forkPair: ForkPair
4949
let philosopherIndex: Int
5050

0 commit comments

Comments
 (0)