Skip to content

add mutable concurrent containers (queues, priority queues, non-contiguous vector, hashmap) #10580

Closed
@thestinger

Description

@thestinger

I'm not sure how to handle concurrent containers in the standard library. In a 1:1 threading situation, it's best to use the native mutex and condition variable types because they're highly optimized. On Linux, they only actually need to do a system call when there's contention or consumer exhaustion because they spin a bit before waiting on futex.

The standard library has a form of M:N queues already, but they block on the scheduler so they aren't going to work well for 1:1 threading.

https://github.com/thestinger/rust-core/blob/master/core/concurrent.rs (blocking bounded/unbounded queues and priority queues with native synchronization primitives)

Metadata

Metadata

Assignees

No one assigned

    Labels

    metabugIssues about issues themselves ("bugs about bugs")

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions