Re: Disgusting hacks [was Re: I wonder if I'm missing something...]

"Tim Bradshaw (as tfb at tfeb dot org)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
Despite saying I was bored by this, I had become annoyed that my code fell about randomly.  Partly this is probably because 'falling about randomly' is The Unix Way, but mostly it turns out to be because the sockets LW hands you are nonblocking, probably because of how LW does I/O (actually this might also just be The Unix Way: sockets might be nonblocking by default as that's obviously the less useful default for naïve programs so it's what Unix would provide).

Anyway, after some more mucking around with the FLI I now have a WITH-SOCKET-BLOCKING macro and this stops at least most of the falling about.

With this it seems to be able to do zero-copy (at Lisp level) I/O of raw vectors ... pretty quickly if they're on the same host.  I need to do some proper benchmarks.

If anyone wants to see this I can probably make a tarball available once I've cleaned it up a bit.

--tim

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.