Added iscompleted property for tasks so that they can be polled without waiting.