Skip to content

[statement] should we force traits be Send+Sync? #10

@pchampin

Description

@pchampin

This was raised by @KonradHoeffner #6 (comment)

Similarly, traits whose implementations cannot be safely shared across threads are also a huge hassle, as with RDF you are often operating with large amounts of data where parallelization makes sense. So rather than supporting the theoretical one-in-a-million use case where someone has for example an IRI based on a string type that is somehow not thread safe, I would prefer if that is defined at a trait level (I guess this means adding Send + Sync everywhere?).

I'm slightly against this. First, I'm wary of arguments like "the theoretical one-in-a-million use case". Second, if you need implementations of a trait (say, Triple) to be Send+Sync, the additional burden of writing Triple+Send+Sync seems reasonable enough.

That being said, I share the intuition that those !Send or !Sync implementations would be rare enough, so if there is consensus on forcing our traits to be Send+Sync I would not oppose it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions