producer consumer algos