INNER CODE UNIT · Go
AcquireExecutionSlot
ovh/utask · utask.go:338
func AcquireExecutionSlot(ctx context.Context) error {
if global == nil {
return nil
}
if global.executionSemaphore == nil {
return nil
}
return global.executionSemaphore.Acquire(ctx, 1)
}
// ReleaseExecutionSlot frees up a slot on the global execution semaphore
func ReleaseExecutionSlot() {
if global == nil {
return
}
if global.executionSemaphore == nil {
return
}