Summary
Currently it is not very clear if this library is thread-safe or not. According to psf/requests#2766 a single session per thread is preferred so should we create multiple Server instances for each thread?
Alternatively I would be very interested in an asyncio Version of this library using httpx or a similar library. This is generally the direction in which Python is now also moving and a lot easier to reason about than multithreaded concurrency. Furthermore it would lead to better code style as all the hidden IO which is currently performed would then be eliminated.
Summary
Currently it is not very clear if this library is thread-safe or not. According to psf/requests#2766 a single session per thread is preferred so should we create multiple
Serverinstances for each thread?Alternatively I would be very interested in an asyncio Version of this library using httpx or a similar library. This is generally the direction in which Python is now also moving and a lot easier to reason about than multithreaded concurrency. Furthermore it would lead to better code style as all the hidden IO which is currently performed would then be eliminated.