TimelyDataflow / differential-dataflow

An implementation of differential dataflow using timely dataflow on Rust.
MIT License
2.55k stars 183 forks source link

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

Closed guswynn closed 2 years ago

guswynn commented 2 years ago

As part of resolving: https://github.com/MaterializeInc/materialize/pull/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