updating task's __call__() method to respect the canceled state