Skip to content

PartialEq implementation of OsIpcSender in inprocess is wrong #414

@jschwe

Description

@jschwe

impl PartialEq for OsIpcSender {
fn eq(&self, other: &OsIpcSender) -> bool {
eq(
&*self.sender.borrow() as *const _,
&*other.sender.borrow() as *const _,

When cloning the OsIpcSender, we will clone the refcell and inner sender, hence two senders of the same channel will compare as false, if they are not the same instance.
This might be a bit tricky to fix though, since the crossbeam sender does not implement PartialEq.

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