Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75235
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!border2.nntp.ams2.giganews.com!backlog4.nntp.ams3.giganews.com!backlog4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ckaynor@zindagigames.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | UNSURE 0.217 |
| X-Spam-Level | ** |
| X-Spam-Evidence | '*H*': 0.57; '*S*': 0.00; 'interpreter': 0.05; 'thread': 0.14; 'created.': 0.16; 'line).': 0.16; 'similarly,': 0.16; 'threads,': 0.16; 'wrote:': 0.18; 'resolved': 0.19; 'subject:problem': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'lines': 0.31; '25,': 0.31; 'prints': 0.31; 'run': 0.32; 'received:209.85.212': 0.32; 'fri,': 0.33; 'guess': 0.33; 'to:name :python-list': 0.33; 'received:209.85': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'module.': 0.36; 'done': 0.36; 'next': 0.36; 'wrong': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'manually': 0.60; 'such': 0.63; 'become': 0.64; 'more': 0.64; 'chance': 0.65; 'occur': 0.65; 'content-type:application/octet-stream': 0.65; 'virus:src="cid:': 0.66; 'content-type:multipart/related': 0.67; 'prompt': 0.68; 'jul': 0.74; 'increase': 0.74; 'behavior': 0.77; 'filename:fname piece:PNG': 0.84; 'odds': 0.84 |
| 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:content-type; bh=rdidVeSYqj6cOG5b+c9ugMsLzY4nWwXskf7cMDJ/9JI=; b=Bi8JBSekLatYzGwpjkzTQtDaWGxbnrafg721BIdLtJbV5U7PCiH+DDHJFNUAa/jYkL dTCFTdVNIjs8MDu7i3hmiEY0yxxsZYEEeGD4Y/dpWjnbr81YKJQM2Om8de9j8kqkd1bI 4FHKifKVoqvySBXj7ID2poKOKu7SpTnkhE2lCniq8RLT721O+cKJ9cm5iewJlKQdL/8g x7ssxRWV+7E60AVvgOt/JXOxYOsIF5rD9or3NZXtlC2eixYb2+4dyd/xCAwQmnw5H2Ii qinrIPS89EDm3R1nQ5U0Wke/0+3mfgPIxG0W+ngTRbXxDlqUh2y58EBntAtdRm/4hbLM 0EmQ== |
| X-Gm-Message-State | ALoCoQm1GTXQ505Oc7xt4PxHVwZEhdMZ4+ooSP2MxVIiEaFCH1L1k48RF31HPvooVXE0N0rouZvD |
| X-Received | by 10.194.177.168 with SMTP id cr8mr5040086wjc.134.1406304502304; Fri, 25 Jul 2014 09:08:22 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <tencent_1CC4554F04C01A7F6AB8300C@qq.com> |
| References | <tencent_1CC4554F04C01A7F6AB8300C@qq.com> |
| From | Chris Kaynor <ckaynor@zindagigames.com> |
| Date | Fri, 25 Jul 2014 09:08:01 -0700 |
| Subject | Re: problem on multi-threading |
| To | python-list <python-list@python.org> |
| Content-Type | multipart/related; boundary=089e013d1d9e4e7e4604ff06c809 |
| X-Mailman-Approved-At | Sat, 26 Jul 2014 08:33:58 +0200 |
| 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.12338.1406356439.18130.python-list@python.org> (permalink) |
| Lines | 495 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1406356439 news.xs4all.nl 2952 [2001:888:2000:d::a6]:48296 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:75235 |
| X-Original-Bytes | 40283 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Fri, Jul 25, 2014 at 12:45 AM, 水静流深 <1248283536@qq.com> wrote: > > never quit from the thread ,why? > I am going to guess that you can actually run code in the interpreter here. When printing from threads, the prompt will end up in the wrong place as the prompt is printed in the main thread. Similarly, there is a (decent) chance that the prints will be done out-of-order (multiple "<Thread..." lines or URLs next to each other or on the same line). The odds that such behavior will occur will increase as the work become more complex and more threads are created. All of this can be resolved by manually using the locking provided in the threading module.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: problem on multi-threading Chris Kaynor <ckaynor@zindagigames.com> - 2014-07-25 09:08 -0700
csiph-web