Skip to content

is SendGrid WebApi v3 thread safe ? #213

Description

@kamelsalah92

We are creating only one instance of the SendGrid class using the API Key of each subuser we have, and the send method which make the SendGrid request can be accessed by any of the threads we have, so is this thread safe? is there any problem for using it that way ? I mean reusing the same SendGrid instance from multiple threads ?

Activity

  1. thinkingserious commented on Aug 14, 2017

    @thinkingserious
    Contributor

    Hello @kamelsalah92,

    This library has not been tested for thread safety. I would recommend extensive testing if you wish to use the library in this way.

    With Best Regards,

    Elmer

  2. andy-trimble commented on Oct 10, 2017

    @andy-trimble
    Contributor

    @kamelsalah92 The API is fully thread safe and can be used in that manner. Under the hood, we are using this HTTP connection manager. It is thread safe, however, it effectively synchronizes across threads, i.e., multiple threads cannot execute concurrently.

    @thinkingserious With minimal changes, we could add the ability to handle multiple concurrent actions using this. But I'm assuming that will be a separate issue opened up.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions