Simplified implementation for producer consumer pattern