A lot of examples we provide use indefinite delays. This is done for
convenience and to ensure the examples are kept as simple as possible.
However, in real applications indefinite delays are rarely a good idea
as they do not provide an opportunity to correct erroneous conditions if
the event being waited for never occurs.
…and in answer to your question…portMAX_DELAY is only an
indefinite delay if INCLUDE_vTaskSuspend is set to 1. The code snippet
you show probably has INCLUDE_vTaskSuspend set to 0, in which case
portMAX_DELAY will be a block time of 0xffffffff or 0xffff, depending on
whether configUSE_16_BIT_TICKS is set to 0 or 1.