Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 74270 invoked from network); 27 Feb 2003 19:57:02 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 27 Feb 2003 19:57:02 -0000 Received: (qmail 16473 invoked by uid 97); 27 Feb 2003 19:58:41 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 16466 invoked from network); 27 Feb 2003 19:58:41 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 27 Feb 2003 19:58:41 -0000 Received: (qmail 73117 invoked by uid 500); 27 Feb 2003 19:56:48 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 73067 invoked by uid 500); 27 Feb 2003 19:56:47 -0000 Received: (qmail 73045 invoked from network); 27 Feb 2003 19:56:47 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 27 Feb 2003 19:56:47 -0000 Received: (qmail 61089 invoked by uid 1624); 27 Feb 2003 19:56:46 -0000 Date: 27 Feb 2003 19:56:46 -0000 Message-ID: <20030227195646.61088.qmail@icarus.apache.org> From: olegk@apache.org To: jakarta-commons-cvs@apache.org Subject: cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpConnection.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N olegk 2003/02/27 11:56:46 Modified: httpclient/src/java/org/apache/commons/httpclient HttpConnection.java Log: Addresses the bug 'waitForResponse is using busy wait' http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17487 Changelog: - HttpConection#waitForResponse request thread is suspended for 50ms when polling for incoming data Contributed by Michael Becke & Oleg Kalnichevski Revision Changes Path 1.48 +10 -4 jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java Index: HttpConnection.java =================================================================== RCS file: /home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- HttpConnection.java 27 Feb 2003 13:38:24 -0000 1.47 +++ HttpConnection.java 27 Feb 2003 19:56:46 -0000 1.48 @@ -693,6 +693,12 @@ while (System.currentTimeMillis() < overtime) { if (isResponseAvailable()) { return true; + } else { + synchronized(this) { + try { + this.wait(50); + } catch (InterruptedException e) {} + } } } LOG.debug("Waiting for response timeout"); --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org