Arc Forumnew | comments | leaders | submitlogin
2 points by joebo 5298 days ago | link | parent

Hi akkartik - Thank you! Your code helped me greatly. there's an issue though with it. The spawn actually needs to happen after the socket is connected. see this for an example:

https://gist.github.com/824730

I tried this on win32 and it works fine. You can see the effect of the thread if you put a (sleep 5) before the dispatch. Multiple requests can connect and then each completes 5 seconds later.

Note: To get threads working on win32, I used this build of SBCL http://www.siftsoft.com/inprogress/sbcl-1.0.44.211.msi from this thread: http://dmitry-vk.livejournal.com/35946.html

Note: I know there's some rookie stuff in the arc/sbcl code of mine. I could replace the lets with withs but am still learning.



1 point by akkartik 5297 days ago | link

So the default windows build doesn't have fork or threads?

Yeah I added the per-request spawn a couple of hours after the initial naive version. Have you pulled recently?

https://github.com/akkartik/wart/commit/77c353a1a86c99761dd1... [1]

The spawn doesn't happen quite where it does in your version, so I think the master ends up doing a little more work per request. Let me know if that has implications; I think you know more about this.

[1] Buggy version, but next commit was good. Just do a git pull.

-----