Producer consumer multiple thread and ISR synchronization

As mentioned, the max block time is your friend, if you want to wait until the notification comes, but wait at most, a certain amount of time, use the max block time.

If you want the time to not start until task1 does something, then use two synchronizations, the first to wait for task1 to do that thing, and then the second one to wait for time or the operation to be done.

As mentioned, Direct to Task Notification using bits would be ideal here.

The other thing is that if you always are doing task1, which then starts task2 (which blocks task1), and then task2 starts task3 and when that is done you go back to task1, so you only want one of these tasks to run at a time, really sounds like this is actually 1 task with phases.