caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Re: Select on channels (again)
@ 2006-08-23  8:29 Christoph Bauer
  2006-08-23 17:35 ` Robert Roessler
  2006-08-24  8:18 ` Robert Roessler
  0 siblings, 2 replies; 19+ messages in thread
From: Christoph Bauer @ 2006-08-23  8:29 UTC (permalink / raw)
  To: Robert Roessler, Caml-list


> > ...
> > I did this, but on windows with two programs communicating 
> over a pipe 
> > this isn't enough. select on windows and on a pipe doesn't work. 
> > Therefore I wrote a stub for PeekNamedPipe():
> 
> "Select on windows" certainly does work... and why not use a 
> socket pair, just as one might on a *nix system?  That way, 
> it will work on both.

Select doesn't work on window pipes. In retrospect sockects
would be the better choice. I stumbled in a strange dead lock
with theses pipes, because under windows the pipe buffer
is set to 1024 bytes (otherlibs/win32unix/pipe.c) and will then
block til the reader reads the contents. IMO this
value (SIZEBUF) should be zero to let the system choose the best
buffer size. [1] 


> And the fact that socketpair has been left out of the Windows 
> version of the Unix module is not an impediment - it is easy 
> to write a useful implementation in OCaml (I can supply one 
> if needed).

Please supply one.

Christoph Bauer

[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipc/base/cr
eatepipe.asp


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Select on channels (again)
@ 2006-08-15  0:46 Nathaniel Gray
  2006-08-21 22:47 ` Nathaniel Gray
  0 siblings, 1 reply; 19+ messages in thread
From: Nathaniel Gray @ 2006-08-15  0:46 UTC (permalink / raw)
  To: Caml Mailing List

Like others before me, I'm hitting the frustrating limitation that
it's impossible to select on a channel.  This limitation forces one to
reimplement buffered IO in many situations where using channels would
otherwise be easy and sensible.  There has been discussion on this
list in the past about this limitation[1], and there have been two
requests filed in mantis for this feature[2,3], but the ocaml dev team
has been silent on the matter.  Is this feature objectionable to the
dev team or is it just a case of "too much work, not enough time?"  If
somebody was to submit a quality patch implementing the feature would
it be accepted?

Cheers,
-n8

[1] <http://caml.inria.fr/pub/ml-archives/caml-list/2005/03/8aae2e3c54cfb976fe52664ab1c84994.en.html>
[2] <http://caml.inria.fr/mantis/view.php?id=3075>
[3] <http://caml.inria.fr/mantis/view.php?id=3579>

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-08-25 22:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-23  8:29 [Caml-list] Re: Select on channels (again) Christoph Bauer
2006-08-23 17:35 ` Robert Roessler
2006-08-24  8:18 ` Robert Roessler
  -- strict thread matches above, loose matches on Subject: below --
2006-08-15  0:46 Nathaniel Gray
2006-08-21 22:47 ` Nathaniel Gray
2006-08-22  0:42   ` [Caml-list] " Jonathan Roewen
2006-08-22  6:27     ` Nathaniel Gray
2006-08-22  6:41       ` Jonathan Roewen
2006-08-22  8:15         ` skaller
2006-08-22 21:15           ` Mike Lin
2006-08-23  5:12         ` Nathaniel Gray
2006-08-22  8:10       ` Olivier Andrieu
2006-08-23  5:27         ` Nathaniel Gray
2006-08-22  8:21       ` Jacques Garrigue
2006-08-23  5:16         ` Nathaniel Gray
2006-08-23  6:35           ` skaller
2006-08-23 19:31             ` Nathaniel Gray
2006-08-24  5:37               ` skaller
2006-08-24 19:06                 ` Nathaniel Gray
2006-08-25  1:55                   ` skaller
2006-08-25 22:19                     ` Nathaniel Gray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).