updateSemaphoreStatePermits
Updates the number of permits in the semaphore state.
Parameters
updateFunction
A function that updates the number of permits considering the current value.
Updates the number of permits in the semaphore state.
A function that updates the number of permits considering the current value.