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

Are calls to Taxjar.TaxjarApi.TaxForOrderAsync() thread safe? #73

Open
AMeyerInkSoft opened this issue Jan 29, 2025 · 0 comments
Open

Comments

@AMeyerInkSoft
Copy link

In our implementation, we only set the TaxjarApi object properties upon construction, and beyond that, we mostly just perform a bunch of calls to TaxForOrderAsync(). Does anyone happen to know if it's safe enough for usage scenarios like this to create a single instance of the TaxjarApi object and perform concurrent calls to TaxForOrderAsync()?

The most notable risk I can surmise might be related to the usage of the RestSharp client library prior to version 110. I haven't spent much time tracing through the RestSharp source code, but it seems the biggest concern with versions between 108 and 110 might be scenarios where consumers are making changes to the RestSharp ParametersCollections, and that doesn't seem to be the case with the TaxJar implementation. Still, our implementation is mission critical enough that I'm hesitant to share an instance of a TaxjarApi object between threads until I've heard some casual confirmation that it's probably okay to call TaxForOrderAsync() concurrently.

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