Skip to content

Conversation

@rob-maron
Copy link
Contributor

No description provided.

@rob-maron rob-maron marked this pull request as ready for review December 3, 2025 19:13
@rob-maron rob-maron changed the title Parallelize reward accounts Parallelize reward account fetches Dec 3, 2025
// Wrap the task, making it wait for a semaphore permit first
let task = async move {
// Acquire the permit
let permit = semaphore.acquire().await;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is safe to just call unwrap() on this since this returns a result

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unwrap() where?

Copy link
Contributor

@imabdulbasit imabdulbasit Dec 4, 2025

Choose a reason for hiding this comment

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

This one returns the resultlet permit = semaphore.acquire().await;

so if the semaphore is dropped it can return an error, which should not happen, so we can just unwrap here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yep 👍

@rob-maron rob-maron merged commit 8b9fc47 into main Dec 5, 2025
116 checks passed
@rob-maron rob-maron deleted the rm/parallelize-reward-accounts branch December 5, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants