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

Reusing the same service object in multithread server okay? #192

Open
EllaBellaStella opened this issue Jun 18, 2021 · 0 comments
Open

Reusing the same service object in multithread server okay? #192

EllaBellaStella opened this issue Jun 18, 2021 · 0 comments

Comments

@EllaBellaStella
Copy link

EllaBellaStella commented Jun 18, 2021

I could not find any mention of thread safety in general within the documentation. Specifically in my use case is it okay to do something like:

# application setup
BLOB_SERVICE = Azure::Storage::Blob::BlobService.create(...)
QUEUE_SERVICE = Azure::Storage::Queue::QueueService.create(...)
...
# multiple threads calling these as part our Puma server responding to requests
blob, contents = BLOB_SERVICE.get_blob(...)
BLOB_SERVICE.create_block_blob(...)
QUEUE_SERVICE.create_message(...)

Or should I be creating a new BlobService, QueueService, etc. object every time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant