mutex example for producer&consumer problem