A Promise implementation of the producer consumer problem