Added forgotten locks to safe_task class
assignment operators of task class are set to be derived