vibe.d beta banner
get vibe.d
0.8.1

Asynchronous I/O that doesn’t get in your way, written in D

Enum member HTTPServerOption.distribute

enum HTTPServerOption
{
  // ...
  distribute = 64,
  // ...
}

Deprecated

Distributes request processing among worker threads

Note that this functionality assumes that the request handler is implemented in a thread-safe way. However, the D type system is bypassed, so that no static verification takes place.

For this reason, it is recommended to instead use runWorkerTaskDist and call listenHTTP from each task/thread individually. If the reusePort option is set, then all threads will be able to listen on the same port, with the operating system distributing the incoming connections.

If possible, instead of threads, the use of separate processes is more robust and often faster. The reusePort option works the same way in this scenario.

Authors

Sönke Ludwig, Jan Krüger, Ilya Shipunov

Copyright

© 2012-2013 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.