From owner-freebsd-stable Thu Mar 29 11:27:16 2001 Delivered-To: freebsd-stable@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id B6CAA37B727 for ; Thu, 29 Mar 2001 11:27:13 -0800 (PST) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id MAA07522; Thu, 29 Mar 2001 12:27:10 -0700 (MST) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id MAA12666; Thu, 29 Mar 2001 12:27:10 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15043.35980.669828.971544@nomad.yogotech.com> Date: Thu, 29 Mar 2001 12:27:08 -0700 (MST) To: Brian Matthews Cc: "'nate@yogotech.com'" , Allen Landsidel , freebsd-stable@FreeBSD.ORG Subject: RE: Threads vs. blocking sockets In-Reply-To: References: X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > | Therefore, if you call a blocking system call, *ALL* threads > | block, thus causing your entire application to 'hang'. > > That's why there are wrappers for the socket calls in libc_r, so a socket as > seen by the kernel is always nonblocking (and thus won't hang the entire > application), but a socket seen by the application can be blocking or > nonblocking, whichever makes most sense for the application. Unfortunately, > the wrappers only do half the job. Again, all threading libraries I've used (not just on FreeBSD) *require* the user to check that when sending/receiving data, the caller must make sure that all the expected data has been sent/received. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message