fix race condition in prodServiceThread