My solution to the sleeping barber problem in erlang.