Skip to content

Are the clients thread safe? #212

@aliaksandrb

Description

@aliaksandrb

Hi! Thanks for this great library, we extensively using it in our project! 👍

Quick question though, are the clients created via ::Gruf::Client.new are thread safe? Could it be initialized once and reused for the lifetime of the application?

Documentation explicitly shows how configuration for Gruf is set in initializer, but examples of usage demonstrated in different sections outside of initializer and I haven't found any referenced to recommended usage pattern.

Which leads me to thinking that client should be created on per-request basis. Is it correct?

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