Skip to content

Add Thread-Safe Wrapper for NotifierHub with Batch Operations #8

@ZivoMartin

Description

@ZivoMartin

Currently, the NotifierHub is not thread-safe by design, which isn't an issue since users can wrap it in an Arc<Mutex<>> or other synchronization primitives if needed. However, it would be beneficial to offer an out-of-the-box thread-safe wrapper for the NotifierHub that retains all existing methods.

Additionally, this wrapper could introduce useful functionalities, such as batch operations. For example, a send_multiple method could take a list of channel IDs and a corresponding list of messages (with the same length) to send to each channel in a single lock acquisition, thereby improving performance in concurrent scenarios.

This enhancement would make the library more user-friendly and provide additional flexibility for multi-threaded use cases.

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