enableWorkerThreads
seems to be deprecated. How do I configure multiple worker threads. With default settings, my server is only saturating one of the CPUs.
On Thu, 21 Nov 2013 18:23:02 +0100, Sönke Ludwig wrote:
Am 21.11.2013 18:15, schrieb Jacek Furmankiewicz:
auto options = new HTTPServerSettings(); options |= HTTPServerOption.distribute; enableWorkerThreads();
Hi, sorry for my lacking D knowledge, but when I do this code I get....
source/app.d(13): Error: 'options |= distribute' is not a scalar, it is a vibe.http.server.HTTPServerSettings source/app.d(13): Error: incompatible types for ((options) |= (distribute)): 'vibe.http.server.HTTPServerSettings' and 'HTTPServerOption' Error: DMD compile run failed with exit code 1
There is a typo in that snipped. Corrected:
auto settings = new HTTPServerSettings; settings.options |= HTTPServerOption.distribute; enableWorkerThreads(); listenHTTP(settings, ...);