Skip to content

Shouldn't VTab::Aux have a Send bound? #1771

Description

@enkore

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions