Skip to content

Is the library thread-safe? #368

Answered by gahisee
gahisee asked this question in Q&A
Nov 11, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Answer is in theory yes, but in practice regards to http connection, no. Since this library uses the BasicHttpClientConnectionManager which manages just one connection, it's best to simply make sync calls.

If I use PoolingHttpClientConnectionManager instead, the exception goes away. Just a few changes were made in SpotifyHttpManager as an experiment.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gahisee
Comment options

Answer selected by gahisee
@dargmuesli
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #366 on November 15, 2023 04:53.