mirror of https://github.com/adamdruppe/arsd.git
slightly more efficient fn -> dg conv
This commit is contained in:
parent
2322315708
commit
74640c3a21
7
cgi.d
7
cgi.d
|
@ -4035,8 +4035,13 @@ void handleCgiRequest(alias fun, CustomCgi = Cgi, long maxContentLength = defaul
|
|||
|
||||
version(cgi_use_fiber)
|
||||
class CgiFiber : Fiber {
|
||||
private void function(Socket) f_handler;
|
||||
private void f_handler_dg(Socket s) { // to avoid extra allocation w/ function
|
||||
f_handler(s);
|
||||
}
|
||||
this(void function(Socket) handler) {
|
||||
this(delegate void(Socket s) { handler(s); });
|
||||
this.f_handler = handler;
|
||||
this(&f_handler_dg);
|
||||
}
|
||||
|
||||
this(void delegate(Socket) handler) {
|
||||
|
|
Loading…
Reference in New Issue