Skip to content

Opts isn't Send because of LocalInfileHandlerObject #17

@jonhoo

Description

@jonhoo

Currently, it is impossible to establish a Conn, or even just construct an Opts, in one thread, and then pass that to another, because Opts is not Send. This kind of setup is fairly common in applications using worker-pools, but is impossible with mysql_async today. In particular, it looks like Opts is not Send due to its Option<LocalInfileHandlerObject>. LocalInfileHandlerObject is not Send because the wrapped LocalInfileHandler is not Sync (Arc<T> is only Send if T: Sync + Send). I think it should be sufficient to have LocalInfileHandler require Self: Sync + Send, though I don't know if that restriction is okay to require?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions