MLton.Socket.shutdown{Read,Write}

Stephen Weeks MLton@sourcelight.com
Tue, 7 Aug 2001 20:48:36 -0700


> It certainly makes sense from the point of view that you can't write after
> you shutdown the write side, but I think that it would be surprising.  For
> instance, if you have your standard functions that use
> 	...
> 	handle e => (close ???; raise e)
> then the close would raise an exception because the stream is already closed.
> I don't have a super strong feeling about this though.  The whole shutdown
> thing is garbage from Bill Joy who just does not know how to design things
> properly.

Actually, closing an already closed instream or outstream is OK.  But it now
occurs to me that we've got the dependence wrong.  Why not have close call the
appropriate shutdown function?