In the last episode (Jul 31), Chris Costello said:
> On Monday, July 31, 2000, Bjorn Tornqvist wrote:
> > But how do I know if my pthreads aren't secretely blocking for a
> > very short time in read() and write()? Documentation anywere?
> 
>    They 'block' for the duration of time it takes to make a
> non-blocking call to read() or write(), which is, as far as your
> program cares, practically zero.

It could take quite a long time, actually, if you are doing random I/Os
and your disk is heavily loaded.  Plain files can't be set
non-blocking, so the process has to wait for the disk to seek and
return the requested data.
 
-- 
        Dan Nelson
        [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to