/python-sleeping-barber

Playing around with python by solving the sleeping barber problem.

Primary LanguagePython

Sleeping Barber Problem - In Python

I just started playing around with Python programming and wanted something fun to program so I put together this solution for the sleeping barber problem (http://en.wikipedia.org/wiki/Sleeping_barber_problem).

As I am no expert in multithreading this is propably not the best solution and can of course be solved in many different ways.

I wanted to have the solution object oriented and try and do the synchronization myself instead of using eg. the Queue class (http://docs.python.org/2/library/queue.html) for the waiting customers.