From owner-freebsd-stable Thu Mar 29 12:40:46 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail01.actzero.com (cpe-24-221-167-196.ca.sprintbbd.net [24.221.167.196]) by hub.freebsd.org (Postfix) with ESMTP id 78C4837B71B for ; Thu, 29 Mar 2001 12:40:43 -0800 (PST) (envelope-from blm@actzero.com) Received: by cpe-24-221-167-196.ca.sprintbbd.net with Internet Mail Service (5.5.2650.21) id ; Thu, 29 Mar 2001 12:40:06 -0800 Message-ID: From: Brian Matthews To: "'nate@yogotech.com'" Cc: freebsd-stable@FreeBSD.ORG Subject: RE: Threads vs. blocking sockets Date: Thu, 29 Mar 2001 12:40:06 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG | 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. Linux doesn't, and I don't think Solaris does (we just moved so I can't try it now, but when I was investigating the problem I'm pretty sure I tried it on our Sun box). Also, it means that threaded Python is basically useless for doing HTTP stuff, as the standard Python library httplib assumes send sends everything or fails (which is how I originally found the problem), and it looks like perl does the same thing. We could probably argue forever which way is more "correct", but it seems to me that having blocking sockets look the same whether you're in a threaded FreeBSD application, a nonthreaded FreeBSD application, a nonthreaded non-FreeBSD Unix application, or a threaded Linux application is a Good Thing. Also, having the standard libraries of two of the major scripting languages work unchanged on FreeBSD seems like a win. Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message