I have this code in my Azure Function:
using var entityLock = await orchestrationContext.LockAsync(entityId);
for (int i = 0; i < 3; i++)
{
// call an entity function, if it does not succeed : wait with a timer like this and then try again
await orchestrationContext.CreateTimer(oneHourInTheFuture, CancellationToken.None);
}
I would like to understand if the lock will be held for the whole duration of the orchestration including the timer or the lock will be released when the orchestration is waiting.