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 D4411200CC6 for ; Tue, 18 Jul 2017 13:50:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D2C19166B72; Tue, 18 Jul 2017 11:50:54 +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 256B7166B6E for ; Tue, 18 Jul 2017 13:50:53 +0200 (CEST) Received: (qmail 8743 invoked by uid 500); 18 Jul 2017 11:50:53 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 8732 invoked by uid 99); 18 Jul 2017 11:50:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2017 11:50:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B5067C1D85 for ; Tue, 18 Jul 2017 11:50:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.202 X-Spam-Level: * X-Spam-Status: No, score=1.202 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id AXSiluSpTc4x for ; Tue, 18 Jul 2017 11:50:39 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C8B205F121 for ; Tue, 18 Jul 2017 11:50:39 +0000 (UTC) Received: from static.162.255.23.37.macminivault.com (unknown [162.255.23.37]) by mwork.nabble.com (Postfix) with ESMTP id 319A353EC8D75 for ; Tue, 18 Jul 2017 04:50:39 -0700 (MST) Date: Tue, 18 Jul 2017 04:50:39 -0700 (MST) From: "slava.koptilin" To: user@ignite.apache.org Message-ID: <1500378639192-15055.post@n6.nabble.com> In-Reply-To: References: <1500312413003-15015.post@n6.nabble.com> Subject: Re: Compute Grid Questions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Tue, 18 Jul 2017 11:50:55 -0000 Hi Matt, It seems that your code is not quite correct. In accordance with the spec Thread.sleep(long millis) clears the interrupted status in case of InterruptedException is raised. Could you try the following implementation of IgniteRunnable? public static class MyTask implements IgniteRunnable { @Override public void run() { boolean isInterrupted = false; while (!isInterrupted) { isInterrupted = Thread.currentThread().isInterrupted(); try { Thread.sleep(3000); } catch (InterruptedException e) { isInterrupted = true; } System.out.println("isInterrupted: " + isInterrupted); } } } Thanks, Slava. -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Compute-Grid-Questions-tp14980p15055.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.