Did you know ... Search Documentation:
Predicate schedule_workers/1
 http:schedule_workers(+Data:dict) is semidet[multifile, library(http/thread_httpd)]
Hook called if a new connection or a keep-alive connection cannot be scheduled immediately to a worker. Dict contains the following keys:
port:Port
Port number that identifies the server.
reason:Reason
One of accept for a new connection or keep_alive if a worker tries to reschedule itself.
peer:Peer
Identify the other end of the connection
waiting:Size
Number of messages waiting in the queue.
queue:Queue
Message queue used to dispatch accepted messages.

Note that, when called with reason:accept, we are called in the time critical main accept loop. An implementation of this hook shall typically send the event to thread dedicated to dynamic worker-pool management.

See also
- http_add_worker/2 may be used to create (temporary) extra workers.
 http:schedule_workers(+Dict)[multifile, library(http/http_dyn_workers)]
Called if there is no immediately free worker to handle the incomming request. The request is forwarded to the thread __http_scheduler as the hook is called in time critical code.
 http:schedule_workers(+Dict)[multifile, library(http/http_dyn_workers)]
Called if there is no immediately free worker to handle the incomming request. The request is forwarded to the thread __http_scheduler as the hook is called in time critical code.