Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 1996 18:33:14 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        leisner@sdsp.mc.xerox.com (Marty Leisner)
Cc:        msmith@atrad.adelaide.edu.au, questions@freebsd.org
Subject:   Re: non-blocking read ?
Message-ID:  <199603121733.SAA20865@labinfo.iet.unipi.it>
In-Reply-To: <9603121627.AA07775@gnu.mc.xerox.com> from "Marty Leisner" at Mar 12, 96 08:26:44 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > Luigi Rizzo stands accused of saying:
> > > is there a simple way to issue a non-blocking read to a regular file ?
> > > 
> > > Ideally, I would like a
> > > 
> > > 	nbread(handle, buf, count);
> > > 
> > > which would start reading from the disk, and could then notify
> > > the completion of I/O via select().
> > 
> > Use async I/O and handle SIGIO like everybody else 8)
> 
> Reads to regular files are non-blocking by default -- you either read
> the next block or return EOF...note, they may take "time", but it isn't

That's my problem... some programs (noticeably the "harvest" cache)
work as a single-threaded process which serves concurrent
requests by trying to avoid blocking calls. It appears to do a nice
job, but for some things (say reads/seeks etc. from disk) it appears
that there is no way to avoid delays -- at least to my knowledge.

	Thanks
	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603121733.SAA20865>