From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id AE1ACBC40 for ; Thu, 28 Oct 2004 23:45:08 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9SLj8kG030655 for ; Thu, 28 Oct 2004 23:45:08 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA09565 for ; Thu, 28 Oct 2004 23:45:07 +0200 (MET DST) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9SLj5Af030634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 28 Oct 2004 23:45:07 +0200 Received: from davidb by mail.davidb.org with local (Exim 4.42 #1 (Debian)) id 1CNI4u-0000ML-8n; Thu, 28 Oct 2004 14:45:04 -0700 Date: Thu, 28 Oct 2004 14:45:04 -0700 From: David Brown To: Vincenzo Ciancia Cc: caml-list@inria.fr Subject: Re: [Caml-list] non-blocking Unix.*stat functions? Message-ID: <20041028214504.GA1279@old.davidb.org> References: <200410282206.35089.vincenzo_mlRE.MOVE@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410282206.35089.vincenzo_mlRE.MOVE@yahoo.it> User-Agent: Mutt/1.5.6i X-Miltered: at concorde with ID 41816864.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41816861.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 caml-list:01 non-blocking:01 wrote:01 userspace:01 threads:01 camlidl:01 pathname:01 unix:01 unix:01 strings:01 functions:01 filesystem:02 binding:02 binding:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: On Thu, Oct 28, 2004 at 10:06:31PM +0200, Vincenzo Ciancia wrote: > in the process of building a multithreaded and up-to-date binding to the > fuse (filesystem in userspace) library, I just noticed that unix.stat > and friends are blocking operations (in the sense that they block other > threads). Binding their unix counterparts using a [blocking] tag in > camlidl would be easy, but could this perhaps be fixed in the standard > library? Well, in "ordinary" filesystems, stat and friends don't generally take very much time, which is probably why they aren't blocking. It wouldn't be hard to make them blocking, but you would have to copy the pathname strings (since they could move while blocked). Dave