If I have a task that is in suspended state due to xQueueReceive with portMAX_DELAY already and then I call vTaskSuspend on that task, will that prevent the the task from waking/running even if the queue has an item inserted into it? I just want to make sure I’m clear on this behaviour.
Yes. When a task is in the Blocked state waiting for a message due to an infinite block time, although the internal implementation has the task in the Suspended list, it is still actually in the Blocked state, and as such can be unblocked by data on the queue. When the task is then Suspended, it moves to the real Suspended state, so will not unblock if data arrives on the queue.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.