INNER CODE UNIT · Go

ReleaseResources

ovh/utask · utask.go:330

func ReleaseResources(names []string) {
	for _, name := range names {
		ReleaseResource(name)
	}
}

// AcquireExecutionSlot takes a slot from a global semaphore
// putting a cap on the total amount of concurrent task executions
func AcquireExecutionSlot(ctx context.Context) error {
	if global == nil {
		return nil
	}
	if global.executionSemaphore == nil {
		return nil
	}
	return global.executionSemaphore.Acquire(ctx, 1)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…