Sunday, December 3, 2017

Is Java GMail API thread-safe?

Question:

In particular, can multiple threads use the same GMail service instance?

Answer:

Nope. Gmail implementation is not thread-safe.
Therefore, if you are running as a multi-threaded application, each thread that you are making requests from must have its own instance of httplib2.Http().
Resource Link: gmail api service

No comments:

Post a Comment