I want to create a static class for working with a database containing methods for getting data. But the fact is that calls to class methods can come from different streams.
Question. How does a similar class behave while simultaneously accessing one of the methods from two different threads? (Will he wait until the first request is completed, will an exception occur, or will the request be executed in another thread?)
More precisely: How to properly organize queries to the database by executing them from different threads?