GcmTaskService and threads

For a service, two tasks with the same tag will never run at the same time. If a new task arrives at a task still running, the new task will be deleted. In addition, different tasks can be scheduled at the same time, each of which is called on a separate thread if their schedules overlap . It's up to you to ensure thread safety when scheduling multiple tasks.

I am confused about this part:

In addition, different tasks can be scheduled at the same time, each of which is called on a separate thread if their schedules overlap.

Does it turn out to still apply to a task with the same tag, or does it apply to two tasks with different tags?

I thought it was about two tasks with different tags because it says Per service, two tasks with the same tag will never execute concurrently

.

In other words, I understand that there will never be two tasks with the same tag running at the same time, but two tasks with different tags can run at the same time. Is it correct?

+3


source to share





All Articles