Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is SendGrid WebApi v3 thread safe ? #213

Closed
kamelsalah92 opened this issue Aug 14, 2017 · 2 comments
Closed

is SendGrid WebApi v3 thread safe ? #213

kamelsalah92 opened this issue Aug 14, 2017 · 2 comments
Labels
difficulty: hard fix is hard in difficulty status: help wanted requesting help from the community type: question question directed at the library

Comments

@kamelsalah92
Copy link

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 ?

@thinkingserious thinkingserious added status: help wanted requesting help from the community type: question question directed at the library labels Aug 14, 2017
@thinkingserious
Copy link
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

@thinkingserious thinkingserious added difficulty: hard fix is hard in difficulty hacktoberfest labels Oct 1, 2017
@andy-trimble
Copy link
Contributor

andy-trimble commented Oct 10, 2017

@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
Labels
difficulty: hard fix is hard in difficulty status: help wanted requesting help from the community type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

3 participants