mirror of https://github.com/adamdruppe/arsd.git
more workers helps in some cases without hurting others. apparently
This commit is contained in:
parent
2872ea3980
commit
ddcc4074e5
3
cgi.d
3
cgi.d
|
@ -4472,7 +4472,7 @@ class ListeningConnectionManager {
|
||||||
if(epoll_ctl(epfd, EPOLL_CTL_ADD, listener.handle, &ev) == -1)
|
if(epoll_ctl(epfd, EPOLL_CTL_ADD, listener.handle, &ev) == -1)
|
||||||
throw new Exception("epoll_ctl " ~ to!string(errno));
|
throw new Exception("epoll_ctl " ~ to!string(errno));
|
||||||
|
|
||||||
WorkerThread[] threads = new WorkerThread[](totalCPUs + 1);
|
WorkerThread[] threads = new WorkerThread[](totalCPUs * 2 + 1);
|
||||||
foreach(i, ref thread; threads) {
|
foreach(i, ref thread; threads) {
|
||||||
thread = new WorkerThread(this, handler, cast(int) i);
|
thread = new WorkerThread(this, handler, cast(int) i);
|
||||||
thread.start();
|
thread.start();
|
||||||
|
@ -9851,6 +9851,7 @@ private struct StackBuffer {
|
||||||
|
|
||||||
this(int a) {
|
this(int a) {
|
||||||
buffer = initial[];
|
buffer = initial[];
|
||||||
|
position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void add(in char[] what) {
|
void add(in char[] what) {
|
||||||
|
|
Loading…
Reference in New Issue