On Tue, 2009-10-06 at 11:30 +0200, Marijn Haverbeke wrote:
Hi Attila,
The changes required to use iolib instead of usocket are very tiny. That's great. If only there was some widely-supported, nice way of parameterised module loading. I don't want to simply incorporate your patch as it is -- that'd break windows support. One approach would be a feature :postmodern-use-iolib that people can push onto *features* before loading Postmodern, and conditionally replaces references to usocket with iolib. Would that work for you?
what about depending on usocket on windows and iolib on *nix ?
As for replacing force-output with finish-output, why did you do that? It seems like it might slow some things down, and unless I am missing something, finish-output does the job.
CLHS says:
finish-output attempts to ensure that any buffered output sent to output-stream has reached its destination, and then returns.
force-output initiates the emptying of any internal buffers but does not wait for completion or acknowledgment to return.
On SBCL(and probably most other implementations) they are equivalent. For iolib I took the CLHS to the letter and only finish-output blocks until all buffered data is written, while force-output only sets a flag that the stream must be flushed by the next blocking operation