Nominatim.API icon indicating copy to clipboard operation
Nominatim.API copied to clipboard

Are instances thread safe and can be configured as singletons?

Open ramonsmits opened this issue 2 years ago • 1 comments

Its not clear from the README is the code is threadsafe. How should these be registered for DI?

ramonsmits avatar Oct 03 '22 10:10 ramonsmits

The integration tests provide some guidance on how to register the services. Scoped should be sufficient. The way that we are using IHttpClientFactory should be thread-safe, but unless you're making thousands of calls per second, it's probably not worth the trouble to use a singleton.

f1ana avatar Oct 31 '22 02:10 f1ana