X-Git-Url: https://git.llucax.com/z.facultad/75.59/filosofos.git/blobdiff_plain/1e5706e940d3ead1978c60c803378bf73dd94f74..2b3101e9328c0fa1e196fcf460f8aff0fda34353:/src/filosofos2.py?ds=sidebyside diff --git a/src/filosofos2.py b/src/filosofos2.py index da6fa8b..37f2cd2 100644 --- a/src/filosofos2.py +++ b/src/filosofos2.py @@ -61,7 +61,6 @@ class filosofo(threading.Thread): self.dejarPalitoIzquierdo() self.dejarPalitoDerecho() - print 'Soy '+str(self.id)+' y solte los palitos' return True else: return False @@ -71,10 +70,16 @@ class filosofo(threading.Thread): def run(self): while not self.lleno(): + self.pensar() self.agarrarPalitoDerecho() self.agarrarPalitoIzquierdo() - if not self.comer(): - self.pensar() + self.comer() + +# while not self.lleno(): +# self.agarrarPalitoDerecho() +# self.agarrarPalitoIzquierdo() +# if not self.comer(): +# self.pensar() if __name__ == '__main__': if len(sys.argv) < 3: