Version française
Home     About     Download     Resources     Contact us    
Browse thread
windows, threads and sockets
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christoph Bauer <christoph.bauer@l...>
Subject: RE: [Caml-list] windows, threads and sockets
> > Any ideas?
> 
> I can't tell you explicitly why it has failed, but 
> Unix.select was completely rewritten for OCaml 3.11.0 based 
> on a big contribution from Sylvain Le Gall (see 
> otherlibs/win32unix/select.c). The principal aim was to make 
> the semantics of Unix.select the same between *NIX and 
> Windows so if it works on Linux then it sounds like you've 
> hit a bug...
> 
Good to know, I missed that change. So the new Unix.select should
now work also on pipes? I guess it from the function named
read_pipe_poll()
in select.c. This is good news, because I can throw away some
workarounds.

But maybe the problem with thread is, that not
otherlibs/win32unix/select.c
is used. There is also otherlibs/threads/unix.ml with seems to overwrite
Unix.select
and there are select() calls in otherlibs/threads/scheduler.c. I'm just
guessing
here.

So maybe the simples solution for me (I have to stick to 3.11.0)
would be to create my thread in plain C, link against is and omit the
dreaded threads library ;-) The task of my thread is very simple...

Thanks for help,
Christoph Bauer