* changed to lock tasks before prepare or process