79645663

Date: 2025-05-30 14:53:06
Score: 1
Natty:
Report link

According to the below, if you don't set an executor, requests are handled serially, i.e. one by one. That would make for a very slow web server.

executor: Allows you to configure the Executor which will be used to handle HTTP requests. By default com.sun.net.httpserver.HttpServer uses a single thread (a calling thread executor to be precise) executor to handle traffic which might be fine for local toy projects.

Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Francis