Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 89B58100B0 for ; Thu, 30 Jan 2014 17:27:53 +0000 (UTC) Received: (qmail 4517 invoked by uid 500); 30 Jan 2014 17:27:48 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4449 invoked by uid 500); 30 Jan 2014 17:27:48 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 4439 invoked by uid 99); 30 Jan 2014 17:27:48 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 17:27:48 +0000 Received: from localhost (HELO mail-oa0-f49.google.com) (127.0.0.1) (smtp-auth username remm, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 17:27:48 +0000 Received: by mail-oa0-f49.google.com with SMTP id i7so3916295oag.8 for ; Thu, 30 Jan 2014 09:27:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fikdcKR50Ms44h/WhPZs4/8d6pG9Ww2OCgmyXUqdk8M=; b=QE4zUezd0L0di4KtzGGck2IW7CC7eeOxppdhbBBHuMNQNqk2Ue5kfAu7veLfTlSBeF 9VfcDHpqKSqMDu8yAUTbzfZS/+Yg/CkEOEhPl/qA4N6w7cK2eicA3vXaR17aB9A03ftl YFYy7X21EIt6imu4/5+tdqg8KLJIvxaTx+XLMIR401EAwz+O0gmmbVRp96jvmSKA3PrH f3kiwS59zMwIANcc+o1GSF4+La8a1wLOxbKJeaen/FGcTyfQ0h4bMXcCBhO8b2B3KwfG v1ku8ibD0iOn0H0IxfATdddwind27zRZS/q7CKFRQe1vBnm2ezTvL7tDk9zyweO/LHfj dV6A== MIME-Version: 1.0 X-Received: by 10.182.233.228 with SMTP id tz4mr2122286obc.56.1391102867215; Thu, 30 Jan 2014 09:27:47 -0800 (PST) Received: by 10.76.74.133 with HTTP; Thu, 30 Jan 2014 09:27:47 -0800 (PST) In-Reply-To: References: <1F20B78E-C2A2-4695-AB4B-2C22B8CC1A52@gopivotal.com> Date: Thu, 30 Jan 2014 18:27:47 +0100 Message-ID: Subject: Re: Tomcat 8.0.0-RC5: asynchron IO and back pressure with ReadListener From: =?ISO-8859-1?Q?R=E9my_Maucherat?= To: Tomcat Users List Content-Type: multipart/alternative; boundary=001a11c306003f1c4404f1336048 --001a11c306003f1c4404f1336048 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2014-01-30 Yann Simon : > It means we cannot write real asynchronous reactive applications with > servlet 3.1... disappointing. > > onDataAvailable is already something asynchronous, so starting an asynchronous operation from it to do the same thing you're supposed to do is not going to make things more asynchronous. Unless you really are careful to do things exactly like in your example, async reads is going to produce thread safety problems. About the specific example, I'd say it doesn't work because the NIO connector doesn't do anything to add the channel to its "poller" when ready flips unless it is already in that state when the container thread returns, but the APR connector does (so it would likely work). R=E9my --001a11c306003f1c4404f1336048--