ExamGecko
Question list
Search
Search

Related questions











Question 433 - H14-231_V1.0 discussion

Report
Export

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
Answers
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
Answers
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
Answers
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
Answers
D.
download task2 is running download task1 is running the close task is running after all tasks in the group are completed
Suggested answer: C, D
asked 18/09/2024
Aung Nyi Nyi Win
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first