The closures for application-defined functions have a bound on Send because (at least my understanding) the sqlite-side destructor (which is drop(Box::..) on our side) can run on another thread than the one which created the Box. Hence, Send. VTab::Aux follows the same life-cycle pattern and so it should also have a bound on Send, right?
On the other hand, I don't understand why these unsafe impls exist:
unsafe impl<'vtab, T: VTab<'vtab>> Send for Module<'vtab, T> {}
unsafe impl<'vtab, T: VTab<'vtab>> Sync for Module<'vtab, T> {}
Since Module is going to be used as a const anyway, nobody has either of those as a bound? (rustc certainly doesn't take issue when removing them)
The closures for application-defined functions have a bound on Send because (at least my understanding) the sqlite-side destructor (which is
drop(Box::..)on our side) can run on another thread than the one which created the Box. Hence, Send. VTab::Aux follows the same life-cycle pattern and so it should also have a bound onSend, right?On the other hand, I don't understand why these unsafe impls exist:
Since Module is going to be used as a const anyway, nobody has either of those as a bound? (rustc certainly doesn't take issue when removing them)