Skip to content
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

feat: concurrent da_dispatcher #288

Merged

Conversation

juan518munoz
Copy link

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

Copy link

@gianbelinche gianbelinche left a comment

Choose a reason for hiding this comment

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

LGTM

async fn dispatch_batches(&self, stop_receiver: Receiver<bool>) -> anyhow::Result<()> {
let (tx, mut rx) = mpsc::channel(100);

let next_expected_batch = Arc::new(AtomicI64::new(NO_FIRST_BATCH));
Copy link
Member

Choose a reason for hiding this comment

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

can you add some docs here about why this atomic is needed?

Copy link
Author

Choose a reason for hiding this comment

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

I've replaced the AtomicI64 in favour of a Mutex that holds an Option, which makes the code clearer. I can add some docs if you still consider it necessary.

Copy link
Member

@juanbono juanbono left a comment

Choose a reason for hiding this comment

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

See comments

@juan518munoz juan518munoz merged commit 6b0b902 into da-eigen-implementation Oct 7, 2024
13 of 30 checks passed
@juan518munoz juan518munoz deleted the da-eigen-implementation-concurrency branch October 7, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants