Reduce lock contention on stratum_connection_mapping by using RwLock · Issue #404 · braidpool/braidpool · GitHub
Skip to content

Reduce lock contention on stratum_connection_mapping by using RwLock #404

Description

@Shivrajsoni

Mentioned in #333 (comment)

Currently stratum_connection_mapping is protected with a Mutex and is locked on each RPC call such as get_miner_info. This can block critical Stratum tasks (e.g., miner connect/disconnect or message dispatch) if RPC calls are frequent.

Using an RwLock could allow concurrent read access for RPC calls while still maintaining exclusive write access for state updates.

This issue tracks refactoring the locking strategy for stratum_connection_mapping to improve concurrency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions