Skip to content

Replace parking_lot mutexes with stdlib #216

@nnmm

Description

@nnmm
Contributor

Starting with Rust 1.62, the standard lib mutexes have roughly equal performance to parking_lot: rust-lang/rust#95035

IMO we could replace parking_lot with the standard lib mutexes throughout our code.

Activity

jhdcs

jhdcs commented on Jul 5, 2022

@jhdcs
Collaborator

This looks pretty good to me! It will help reduce the size of the library as well!

The only snag I can foresee is that we will have to deal with the possibility of poisoned Mutexes again, unless std did away with that?

nnmm

nnmm commented on Jul 5, 2022

@nnmm
ContributorAuthor

Yes, the lock() calls will be slightly uglier, but lock poisoning is a safety feature, so I'd say it's a net win.

esteve

esteve commented on Jul 5, 2022

@esteve
Collaborator

Sounds good to me. The more we can use from stdlib the better 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @esteve@nnmm@jhdcs

      Issue actions

        Replace parking_lot mutexes with stdlib · Issue #216 · ros2-rust/ros2_rust