Huawei HCIP-HarmonyOS Application Developer V1.0 H14-231_V1.0 Question # 121 Topic 13 Discussion

Huawei HCIP-HarmonyOS Application Developer V1.0 H14-231_V1.0 Question # 121 Topic 13 Discussion

H14-231_V1.0 Exam Topic 13 Question 121 Discussion:
Question #: 121
Topic #: 13

In order to put a series of related download tasks into a task group, a developer uses the following code:

String dispatcherName =

"parallelTaskDispatcher";

TaskDispatcher dispatcher =

createParallelTaskDispatcher(dispatcherName,TaskPriority.DEFAULT);

Group group

=dispatcher.createDispatchGroup();

dispatcher.asyncGroupDispatch(group,new

Runnable(){

@Override

public void run(){

HiLog.info(LABEL_LOG,"download taskl is

running ");

}

});

dispatcher.groupDispatchlotify(group,new

Runnable(){

@0verride

public void run(){

HiLog.info(LABEL_L0G,"the close task2 is

running");

}

});

dispatcher.groupDispatchlotify(group,new

Runnable(){

@Override

public void run(){

HiLog.info(LABEL_L0G, "the close task is

running after all tasks in the group are

completed");

}

});

If the developer runs this code, which of the following results might occur?


A.

the close task is running after all tasks in the group are completed download task1 is running download task2 is running


B.

download task1 is running the close task is running after all tasks in the group are completed dowmload task2 is running


C.

download task1 is running download task2 is running the close task is running after all tasks in the group are completed


D.

download task2 is running download task1 is running the close task is running after all tasks in the group are completed


Get Premium H14-231_V1.0 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.