byu-dnasc / proto-smrtlink-share

0 stars 1 forks source link

Concurrent request fulfillment #9

Closed adknaupp closed 3 months ago

adknaupp commented 3 months ago

It can take time to fulfill a request, so each request should be handled asynchronously. Therefore, each HTTPHandler instance should be given its own thread. Does HTTPServer do this by default?

adknaupp commented 3 months ago

Switched out HTTPServer for ThreadingHTTPServer. Easily demonstrated threading by running test which places three requests. With HTTPServer, the test took at least three seconds (because of sleep). After, it took no time at all.