aboutsummaryrefslogtreecommitdiff
path: root/src/philo/table.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-05 14:04:41 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-05 14:04:41 +0200
commit6100010d6873845413aed22744470616992df603 (patch)
tree5cefcd46851d06e0d9e9b09f578c13649582d075 /src/philo/table.py
parent8a351c6d267c55445de7b7b40b1de3b16305bd02 (diff)
downloadphilosophers_test-6100010d6873845413aed22744470616992df603.tar.gz
philosophers_test-6100010d6873845413aed22744470616992df603.tar.bz2
philosophers_test-6100010d6873845413aed22744470616992df603.zip
Readded should be dead test
Diffstat (limited to 'src/philo/table.py')
-rw-r--r--src/philo/table.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/philo/table.py b/src/philo/table.py
index 56ed331..66eaa9d 100644
--- a/src/philo/table.py
+++ b/src/philo/table.py
@@ -6,7 +6,7 @@
# By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/10/01 10:53:29 by cacharle #+# #+# #
-# Updated: 2020/10/01 14:15:09 by cacharle ### ########.fr #
+# Updated: 2020/10/05 14:03:35 by cacharle ### ########.fr #
# #
# ############################################################################ #
@@ -17,6 +17,7 @@ from philo import Philo
from philo import error
from philo.event import Event
+
class Table:
def __init__(
self,
@@ -55,10 +56,8 @@ class Table:
if self.dead:
return
-
for p in self._philos:
p.check()
-
fork_used = sum([p.used_forks for p in self._philos])
if fork_used > self._philo_num:
raise error.Log(self._logs, "Using nonexistant forks")