RejectedSoftware Forums

Sign up

multithreaded vibe.d and VibeIdleCollect -- hangup

i read about HTTPServerOption.distribute and tried to use it like this:

auto settings = new HTTPServerSettings;
settings.options = HTTPServerOption.parseQueryString|HTTPServerOption.distribute;
settings.disableDistHost = true;
auto router = new URLRouter;
router.any("*", &testHandler);
listenHTTP(settings, router);

i'm using vibe.d default main(), and two core CPU. everything works fine without HTTPServerOption.distribute, but with this option set server starts and does nothing: i.e. it listening for connections but doesn't process 'em. am i doing something wrong? i just want vibe.d to utilize all CPU cores.

tested on 0.7.19 and 0.7.20.alpha1 (GDC is unable to build 0.7.20.beta1).

ah, just retested it and found that it happens only if i set "VibeIdleCollect" option.

Re: multithreaded vibe.d and VibeIdleCollect -- hangup

0.7.20.beta1 shows the same behavior with GDC (have to remove some @safes to build it)