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

make capture::source's token thread-safe #364

Merged
merged 3 commits into from
Apr 25, 2022

Conversation

guswynn
Copy link
Contributor

@guswynn guswynn commented Apr 25, 2022

As part of resolving: MaterializeInc/materialize#11987, we

in general, thread-safety comes at a small perf cost, but in this case, the sync activator is only called once, and the Arc is never cloned, so it will not be a measurable difference, other than the upgrade costing one atomic load each run. This is a strictly more general api now! The Send + Sync can be coerced away if need be

I can clean this up once I make a Sync version of ActivatorOnDrop in the timely repo!

tested locally, token drop does in fact clear the local token vector

src/capture.rs Outdated Show resolved Hide resolved
src/capture.rs Outdated Show resolved Hide resolved
src/capture.rs Outdated Show resolved Hide resolved
src/capture.rs Outdated Show resolved Hide resolved
Copy link
Member

@frankmcsherry frankmcsherry left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@frankmcsherry frankmcsherry merged commit 8155e02 into TimelyDataflow:master Apr 25, 2022
@guswynn guswynn deleted the capture-thread branch April 25, 2022 23:16
antiguru pushed a commit to antiguru/differential-dataflow that referenced this pull request May 11, 2022
* make capture::source's token thread-safe

* clean up capability dropping more

* break tuple out into variables
This was referenced Oct 29, 2024
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.

2 participants