* non-blocking Unix.*stat functions?
@ 2004-10-28 20:06 Vincenzo Ciancia
2004-10-28 21:45 ` [Caml-list] " David Brown
0 siblings, 1 reply; 3+ messages in thread
From: Vincenzo Ciancia @ 2004-10-28 20:06 UTC (permalink / raw)
To: caml-list
Hi all,
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?
Thanks
Vincenzo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] non-blocking Unix.*stat functions?
2004-10-28 20:06 non-blocking Unix.*stat functions? Vincenzo Ciancia
@ 2004-10-28 21:45 ` David Brown
2004-10-29 8:07 ` Vincenzo Ciancia
0 siblings, 1 reply; 3+ messages in thread
From: David Brown @ 2004-10-28 21:45 UTC (permalink / raw)
To: Vincenzo Ciancia; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] non-blocking Unix.*stat functions?
2004-10-28 21:45 ` [Caml-list] " David Brown
@ 2004-10-29 8:07 ` Vincenzo Ciancia
0 siblings, 0 replies; 3+ messages in thread
From: Vincenzo Ciancia @ 2004-10-29 8:07 UTC (permalink / raw)
To: caml-list
On Thursday 28 October 2004 23:45, David Brown wrote:
> Well, in "ordinary" filesystems, stat and friends don't generally
> take very much time, which is probably why they aren't blocking.
Not quite, there is the cd reader; on a newly inserted cdrom for
example:
vincenzo@ronzinante vincenzo $ cd /mnt/cdrom
vincenzo@ronzinante cdrom $ time stat .
[...]
real 0m11.966s
this is also a problem with the Unix.LargeFile module of course.
Vincenzo
--
Money for nothing, that's the way you do it
[Dire Straits]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-29 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-28 20:06 non-blocking Unix.*stat functions? Vincenzo Ciancia
2004-10-28 21:45 ` [Caml-list] " David Brown
2004-10-29 8:07 ` Vincenzo Ciancia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox