Skip to content

Conversation

ferhatelmas
Copy link
Contributor

@ferhatelmas ferhatelmas commented Oct 13, 2025

If context is canceled, we're still trying to acquire a semaphore but it's unnecessary so check context before blocking. This can improve cancelation speed by preventing starvation.

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ldez
Copy link
Member

ldez commented Oct 13, 2025

please add a description

@ldez ldez self-requested a review October 13, 2025 16:19
@ldez ldez changed the title refactor: no semaphore if canceled dev: no semaphore if canceled Oct 13, 2025
@ldez ldez added topic: cleanup Related to code, process, or doc cleanup waiting for: contributor feedback Requires additional feedback labels Oct 13, 2025
@ferhatelmas
Copy link
Contributor Author

added a description 🙏🏻

@ldez ldez removed the waiting for: contributor feedback Requires additional feedback label Oct 13, 2025
@CLAassistant
Copy link

CLAassistant commented Oct 13, 2025

CLA assistant check
All committers have signed the CLA.

@ldez ldez added this to the unreleased milestone Oct 13, 2025
@ldez
Copy link
Member

ldez commented Oct 13, 2025

You must sign the CLA

@ldez ldez added the waiting for: contributor feedback Requires additional feedback label Oct 13, 2025
@ferhatelmas
Copy link
Contributor Author

done!

@ldez ldez removed the waiting for: contributor feedback Requires additional feedback label Oct 13, 2025
@ldez
Copy link
Member

ldez commented Oct 13, 2025

I noticed that you are working for Cloudflare.

I'm trying to reach companies that use golangci-lint for sponsoring.

Could I ask you if you have any contacts to share?

You can use the email from our GitHub profile if needed.

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit 69217a5 into golangci:main Oct 13, 2025
18 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/no-semaphore-if-canceled branch October 13, 2025 17:33
@ferhatelmas
Copy link
Contributor Author

Sure, I will loop you in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: cleanup Related to code, process, or doc cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants