Version française
Home     About     Download     Resources     Contact us    
Browse thread
non-blocking Unix.*stat functions?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] non-blocking Unix.*stat functions?
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