-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build test #16652
base: develop
Are you sure you want to change the base?
build test #16652
Conversation
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
|
|
||
// ExecuteTask executes a task in parallel, returning ErrMaxParallelExecutionLimitReached if the maximum number of | ||
// parallel executing tasks has been reached. The task is executed with the given context. | ||
func (t *parallelExecutionLimiter) ExecuteTask(ctx context.Context, task func(ctx context.Context)) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are we calling this?
// parallel executing tasks has been reached. The task is executed with the given context. | ||
func (t *parallelExecutionLimiter) ExecuteTask(ctx context.Context, task func(ctx context.Context)) error { | ||
if !t.sem.TryAcquire(1) { | ||
return ErrMaxParallelExecutionLimitReached |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of failing? What are we going to do if this starts failing in production?
fix for https://smartcontract-it.atlassian.net/browse/CAPPL-607, executes the capabilities in parallel. Note, it doesn't use a threadpool as suggested on the call as threads in golang are cheap to instantiate, however it does limit the number of capability executions that can run in parallel which is the desired outcome.