-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: concurrent da_dispatcher #288
Conversation
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.
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)); |
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.
can you add some docs here about why this atomic is needed?
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.
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.
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.
See comments
What ❔
Why ❔
Checklist
zk fmt
andzk lint
.