English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2009-08-07 (07:54)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] windows, threads and sockets
Christoph Bauer wrote:
> I'm not quite sure what is going on, but my best bet is this: the main
> loop waits for the sockets with
> Unix.select listOfSockets [] [] timeout
> One socket is the listener socket on which new connections
> are made. Unix.select returns a list of sockets. Initially
> it must be the listener socket. This is checked with a compare
>   socket = listenSocket
> and this seems to be suddenly wrong (just in the thread case).
> 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...