D2 & Web-Framework

Adam D. Ruppe destructionator at gmail.com
Wed Jul 3 06:31:55 PDT 2013


On Wednesday, 3 July 2013 at 09:45:18 UTC, Dicebot wrote:
> On the other hand both creating process and thread are so much 
> more expensive than not creating anything at all :P

I recently added a process pool to cgi.d and it was both the 
simplest and the fastest option for the http server it has. I 
tried to do a thread pool, to avoid creating stuff in the main 
loop, but I messed it up.

The process pool on Linux though was dead easy and worked really 
well. I find it kinda interesting how threads in D seem to 
emulate processes too, with TLS giving you a sort of separate 
address space - just easier to get right as the programmer I 
guess.


More information about the Digitalmars-d mailing list