Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73774

Re: thread.interrupt_main() behaviour

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'method,': 0.09; 'cc:addr :python-list': 0.11; 'thread': 0.14; 'expert,': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'thread,': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'case.': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'running': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'two': 0.37; 'to:addr:gmail.com': 0.65; 'jul': 0.74; 'interrupt': 0.84; 'interrupted': 0.96
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HvC66DZzXi8qIUpMDLruwPIeIXTC/slAG6aBnTQc/FA=; b=SZHwhL09pN0wjJVLzzV8E8n0US+o6SCyhB9BLaxgxqc8Uxq6+hzd9f4vrMNCt7oNbk B4OoqK6HiUJQ2yH3w+OURdYv/TGy7fz4RPQY6FjaWKqj4S2EMcEdLeRxrvXHHX+ajEBG AiIhoqTW2fPh/QOUGntxpG+S3ffarBwfeDGMVxHu8xUc+QEXbEBXCKnvSlP58rpWn6Jh ShjdlsHn0y3YWbAKEjZ3sPfCPCwFnqBNS6sySRmDyREBk5SwzwyJORT2FlZLKYsLKvLK 2egVxN9d2lm2JofZgrXbea7hMSmPqdWx4OCYvPA3d4d+cvvdjsbZMqB3IITA8U8RPGEb Aa5A==
MIME-Version 1.0
X-Received by 10.50.56.84 with SMTP id y20mr38971128igp.8.1404207902204; Tue, 01 Jul 2014 02:45:02 -0700 (PDT)
Sender skip.montanaro@gmail.com
In-Reply-To <CAJV9OM9EfaystFNUtQJLapwP7yUhnjinduS=K8HDj2_BL9ys-Q@mail.gmail.com>
References <CAJV9OM9EfaystFNUtQJLapwP7yUhnjinduS=K8HDj2_BL9ys-Q@mail.gmail.com>
Date Tue, 1 Jul 2014 04:45:02 -0500
X-Google-Sender-Auth mZzDA6iHNpb8Au5MAQ-h3FYJA2k
Subject Re: thread.interrupt_main() behaviour
From Skip Montanaro <skip@pobox.com>
To Piyush Verma <114piyush@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc Python <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11358.1404207905.18130.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404207905 news.xs4all.nl 2839 [2001:888:2000:d::a6]:53994
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:73774

Show key headers only | View raw


On Tue, Jul 1, 2014 at 3:58 AM, Piyush Verma <114piyush@gmail.com> wrote:
>
> Since two threads are running same method, I wanted to know which main thread will be interrupted in both case.

I'm no threading expert, but a process can only have one main thread,
the one you labeled "P". Threads T2 and Tt2 will both interrupt that
thread.

Skip

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: thread.interrupt_main() behaviour Skip Montanaro <skip@pobox.com> - 2014-07-01 04:45 -0500

csiph-web