From owner-freebsd-hackers Mon Jul 31 12:34:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id BA3EF37B8E2 for ; Mon, 31 Jul 2000 12:34:12 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id OAA16655; Mon, 31 Jul 2000 14:33:35 -0500 (CDT) (envelope-from dan) Date: Mon, 31 Jul 2000 14:33:35 -0500 From: Dan Nelson To: Chris Costello Cc: Bjorn Tornqvist , Nate Williams , freebsd-hackers@FreeBSD.ORG Subject: Re: BSD,Posix,Linux Threading - Are they really useable? Message-ID: <20000731143335.A12633@dan.emsphone.com> References: <398111DA.443B41F9@tornqvist.net> <20000728003913.K37935@holly.calldei.com> <200007281538.JAA22915@nomad.yogotech.com> <20000728140854.L37935@holly.calldei.com> <398534AF.467DE4D5@tornqvist.net> <20000731140304.Y37935@holly.calldei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <20000731140304.Y37935@holly.calldei.com>; from "Chris Costello" on Mon Jul 31 14:03:04 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message