Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 538AB2009EE for ; Wed, 18 May 2016 20:04:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5249A160A00; Wed, 18 May 2016 18:04:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9A9991609B0 for ; Wed, 18 May 2016 20:04:33 +0200 (CEST) Received: (qmail 24211 invoked by uid 500); 18 May 2016 18:04:32 -0000 Mailing-List: contact dev-help@reef.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@reef.apache.org Delivered-To: mailing list dev@reef.apache.org Received: (qmail 24196 invoked by uid 99); 18 May 2016 18:04:32 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2016 18:04:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 32DC818050F for ; Wed, 18 May 2016 18:04:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.448 X-Spam-Level: * X-Spam-Status: No, score=1.448 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id aOAVBdrIn046 for ; Wed, 18 May 2016 18:04:30 +0000 (UTC) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 5C92E60E3A for ; Wed, 18 May 2016 18:04:29 +0000 (UTC) Received: by mail-io0-f176.google.com with SMTP id i75so75759151ioa.3 for ; Wed, 18 May 2016 11:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=tw13zIeXX3sidA1AO4lmyrN0EPmX9BG/ljjn0fToyok=; b=Q9kubqJj23Vq3b002zBgCiVAIrrL6xYWVd7C2MlI3gCIF7xI1f9VPUmwx7qQdNxsNA ZygLlQy+TSODi+6OkYBLoeDK7UNI74q7wDMSYSjKpFXc64DUZE1lPFOs2oIneUsCaNtt ncdCGUKsGB0hESyJxUrkNa86jts2n0MjTVAOhyIG0gta8qDCkm9ygdWovjh1QrKBludG 4nRkmhtZKcCvT5wSfxJpItBtlpfdQNppfPwEVpRP05PPppl7J5WEvzcBraDUjUzeQn7h AK2smZ71ZxY8JrYQLtK8XPH7L7+dhRkDvcr1MHp4OxSSwme+Htn33m00BOdGU5d0sbGF qTbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=tw13zIeXX3sidA1AO4lmyrN0EPmX9BG/ljjn0fToyok=; b=NrSm0f5OINttFguLHjiaVPbuuUZo1T7+1oB3L3bgLoLdRip3HGJN7VT8KwfVsT19x+ HTgbCZNJk9fN0UbDYoZFI6P47WpLDFZJPkgvOlDIhR6iYUddgCxR0x5vG6GXw8fKGOQ3 0j+l4OFgzwKz4Z8veMySx/x11x/n/JM8pOcZCOZE/IVdff1BA/Qgs28H4FFh2E7YuHXa W0xhrRZQiPIx9nNaHG3j41K5vQfqpTdQ46m9mTsyJEDLrvyOXCETO4hKyTAom3KixWbJ jOmpGCGGQyp3WzXRwi6zRa53bYvF+xoL2VSSPl6EZQCsyy0b5aZp127s5srUC8CMz9ms 2vnw== X-Gm-Message-State: AOPr4FUkWxilM3U8X+oJ2W3Dv+SkjeGxHHGJWmpcGwjbNWbk8CCXzB8AbakAQDP7BBbiYEiH4dlYWHYnZDeg2g== X-Received: by 10.36.17.134 with SMTP id 128mr6427878itf.83.1463594668053; Wed, 18 May 2016 11:04:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.87.197 with HTTP; Wed, 18 May 2016 11:03:48 -0700 (PDT) In-Reply-To: <573CA8AB.9050808@weimo.de> References: <573CA8AB.9050808@weimo.de> From: Andrew Chung Date: Wed, 18 May 2016 11:03:48 -0700 Message-ID: Subject: Re: Test failure in master To: dev@reef.apache.org Content-Type: multipart/alternative; boundary=001a1143f53a48d88d053321b01a archived-at: Wed, 18 May 2016 18:04:34 -0000 --001a1143f53a48d88d053321b01a Content-Type: text/plain; charset=UTF-8 Hi Markus, Yes, however, note that the documentation[0] mentions that `getActiveCount()` returns the *approximate* number of threads that are active. It seems that there are people that have already run into trouble with using it[1]. To solve this, I'm using `getInMeter().getCount() - getOutMeter().getCount()` in `ThreadPoolStage` instead, and putting `afterOnNext` into the `finally` block in the `run` method of `executor.submit`. Thanks, Andrew [0]: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html#getActiveCount%28%29 [1]: http://stackoverflow.com/questions/7271541/threadpoolexecutors-getactivecount/7271685 On Wed, May 18, 2016 at 10:38 AM, Markus Weimer wrote: > Hi, > > our idless check boils down to checking whether or not any thread in > `org.apache.reef.wake.impl.ThreadPoolStage` is still active. That calses is > based on a `ThreadPoolExecutor`, which has a convenient method > `.getActiveCount()`. Maybe we need to expose that method in some elegant > way? > > Markus > --001a1143f53a48d88d053321b01a--