From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id A50CCBC37 for ; Fri, 7 Aug 2009 11:31:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhEBAKuRe0pVnoujkWdsb2JhbACBUphvAQEBAQkLCgcTBbR8hBYF X-IronPort-AV: E=Sophos;i="4.43,341,1246831200"; d="scan'208";a="30889310" Received: from mail188.messagelabs.com ([85.158.139.163]) by mail2-smtp-roc.national.inria.fr with SMTP; 07 Aug 2009 11:31:02 +0200 X-VirusChecked: Checked X-Env-Sender: christoph.bauer@lmsintl.com X-Msg-Ref: server-12.tower-188.messagelabs.com!1249637461!29638116!1 X-StarScan-Version: 6.1.3; banners=-,-,- X-Originating-IP: [213.68.136.230] Received: (qmail 2589 invoked from network); 7 Aug 2009 09:31:01 -0000 Received: from kaiserslautern1.lms-gmbh.de (HELO mail-in.lmsintl.com) (213.68.136.230) by server-12.tower-188.messagelabs.com with SMTP; 7 Aug 2009 09:31:01 -0000 Received: from KL-SRV57.lmsintl.com (unknown [10.2.100.57]) by mail-in.lmsintl.com (Postfix) with ESMTP id 57AEF43C005; Fri, 7 Aug 2009 13:57:07 +0200 (CEST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Re: windows, threads and sockets Date: Fri, 7 Aug 2009 11:30:58 +0200 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Caml-list] Re: windows, threads and sockets Thread-Index: AcoXOrAsNaZuKBrJRzGS5Dw22YCE2gABXqLg References: From: "Christoph Bauer" To: "Sylvain Le Gall" , X-Spam: no; 0.00; sockets:01 sockets:01 iter:01 printf:01 memq:01 ocaml:01 -thread:01 ocamlfind:01 -package:01 systhreads:01 scheduler:01 otherlibs:01 systhreads:01 threadunix:01 threads:01 > Do you mean that the following code is wrong with 3.11.1 and=20 > not 3.10.2: >=20 > let res_listener =3D Unix.select listOfSockets [] [] timeout in=20 > (List.nth res_listener 0) =3D listenSocket >=20 > Can you find listenSocket in the result elsewhere ? No! I try to clarify:=20 my check is then=20 match Unix.select sockets [] [] timeout with | (l,_,_) -> List.iter (fun sock -> printf "%b,%b\n" (List.mem sock sockets) (List.memq sock sockets)) l I only use OCaml 3.11.0. It only happens on windows. If I compile and link with -thread and link with ocamlfind ... -package threads then the result is false,false But without the thread package the result is true,true BTW, I use systhreads, but the files (scheduler.c, unix.ml) I mentioned before are used in the vmthread case. In otherlibs\systhreads\threadUnix.ml I found let select =3D Unix.select Regards, Christoph Bauer =20