Обедающие философы

Jul 24, 2005 19:51


Решил использовать библиотеку Boost threads. Среди примеров - новая реализация «Обедающих философов» Дейкстры. Теперь вместо вилок курицы, и появился шеф-повар! Вот фрагмент вывода этой программы:  

(90140) Chef: more chickens ... 4 now available ... NOTIFYING ...
(90140) Phil1: those chickens look good ... one please ...
(90140) Chef: cooking ...
(90140) Phil2: those chickens look good ... one please ...
(90140) Phil1: mmm ... that's good ...
(90140) Phil4: those chickens look good ... one please ...
(90156) Phil2: mmm ... that's good ...
(90156) Phil3: those chickens look good ... one please ...
(90156) Phil4: mmm ... that's good ...
(90156) Phil0: wot, no chickens? I'll WAIT ...
(90156) Phil3: mmm ... that's good ...
(92140) Chef: 4 chickens, ready-to-go ...
(92140) Chef: ouch ... make room ... this dish is very hot ...
(93156) Phil1: gotta eat ...
(93156) Phil2: gotta eat ...
(93156) Phil4: gotta eat ...
(93156) Phil3: gotta eat ...
(95140) Chef: more chickens ... 4 now available ... NOTIFYING ...
(95140) Phil1: those chickens look good ... one please ...
(95156) Chef: cooking ...
(95156) Phil2: those chickens look good ... one please ...
(95156) Phil1: mmm ... that's good ...
(95156) Phil4: those chickens look good ... one please ...
(95156) Phil2: mmm ... that's good ...
(95156) Phil3: those chickens look good ... one please ...
(95156) Phil4: mmm ... that's good ...
(95156) Phil0: wot, no chickens? I'll WAIT ...
(95156) Phil3: mmm ... that's good ...
(97156) Chef: 4 chickens, ready-to-go ...
(97156) Chef: ouch ... make room ... this dish is very hot ...
(98156) Phil1: gotta eat ...
(98156) Phil2: gotta eat ...
(98156) Phil4: gotta eat ...
(98156) Phil3: gotta eat ...
(100156) Chef: more chickens ... 4 now available ... NOTIFYING ...
(100156) Phil1: those chickens look good ... one please ...
(100156) Chef: cooking ...
(100156) Phil2: those chickens look good ... one please ...
(100156) Phil1: mmm ... that's good ...
(100156) Phil4: those chickens look good ... one please ...
Previous post Next post
Up