Skip to content

Why does Error require Send (and Sync)? #81

Closed
@d-e-s-o

Description

@d-e-s-o

See title. It's not clear to me. The documentation says:

Error requires that the error is Send, Sync, and 'static.

I can see that ;) But there is no explanation. I haven't found one in the source code either.

In a different issue where the suggestions was made that

anyhow could do something on it's end via specialisation or using ?Send and ?Sync or something

The response was:

I would prefer not to make a change for this

Again, no explanation. May I ask why this requirement exists?

I am asking because I am dealing with an error type that -- legitimately, in my opinion -- has a variant that contains a PoisonError which in turn wraps a MutexGuard. The latter does not implement Send, rendering anyhow useless with those error types, from what I can tell.

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