From owner-freebsd-hackers Tue Jul 6 10:33:20 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 8A09C14F68; Tue, 6 Jul 1999 10:33:17 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id KAA10337; Tue, 6 Jul 1999 10:33:16 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id KAA15634; Tue, 6 Jul 1999 10:33:16 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 06 Jul 1999 10:33:16 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: "Brian F. Feldman" Subject: Re: poll() vs select() Cc: hackers@FreeBSD.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brian F. Feldman wrote: > On Tue, 6 Jul 1999, John Polstra wrote: > >> In article , >> >> The application itself has to get involved if it wants to do async >> name lookups, or async anything else, for that matter. Suppose you >> do have an async thread to do hostname lookups as you propose. What >> is the application going to do while that thread is waiting for the >> lookup to complete? It depends on the application, and thus it has >> to be coded into the application. Maybe there's nothing useful the >> application could do until the lookup returns. >> >> I've been told that it works fine to use libc_r and put the name >> lookups into a separate thread. But to take advantage of it, the >> application has to have something useful it wants to do (and can do) >> in the meantime. > > It would let the other threads run more while the lookup is occurring. > Wouldn't that be the most natural expectation of it? Or would this > be too hard without kernel-assisted threading? What I'm saying is, we already have that in multi-threaded applications. The system can't just provide it automatically to single-threaded applications; they wouldn't know how to take advantage of it. In other words: * Multi-threaded applications already have it. * Single-threaded applications can't use it. John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message