moved declarations, they were in the wrong file.
producers-consumers problem.