3 ms·
Nice. I wonder what the threading model is? Process per request? Thread per request? NodeJS style?
by quickthrower2 8y ago
Nice. I wonder what the threading model is? Process per request? Thread per request? NodeJS style?
- brlewis 8y agoI think it's single-threaded synchronous. https://github.com/urlysses/1991/blob/1991/1991.fs#L469 https://github.com/urlysses/1991/blob/1991/1991.fs#L469 https://github.com/forthy42/gforth/blob/master/unix/socket.fs#L439 https://github.com/forthy42/gforth/blob/master/unix/socket.f...
- RodgerTheGreat 8y agoOne process, one HTTP request at a time, buffering excess requests in a queue of up to 255 requests. Here's the main "event loop": : start-server { server client } begin server 255 listen server accept-socket to client client read-request prepare-response client send-response again ; I think this word's definition should be fairly easy to follow even if you aren't familiar with Forth.