Producer consumer multiple thread and ISR synchronization

Hmm. Maybe I could use xTaskNotifyWait function, but do you know maybe if xMaxBlockTime can be set also to 0? I would like my loop to be extremely efficient and waiting with all the tasks blocked for 1ms might be a bit too much.

xResult = xTaskNotifyWait( pdFALSE, /* Don’t clear bits on entry. /
ULONG_MAX, /
Clear all bits on exit. /
&ulNotifiedValue, /
Stores the notified value. */
xMaxBlockTime );