Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95483
| Path | csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <antoon.pardon@rece.vub.ac.be> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.025 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'indicating': 0.05; 'received:134': 0.05; 'subject:Why': 0.09; 'def': 0.13; 'received:ac.be': 0.16; 'threading': 0.16; 'timeout.': 0.16; 'bit': 0.23; 'module': 0.25; 'header:User-Agent:1': 0.26; 'locks': 0.29; 'signatures': 0.29; 'subject:/': 0.30; 'received:be': 0.30; 'should': 0.36; 'to:addr:python-list': 0.36; 'someone': 0.38; 'why': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'different': 0.63; 'hand': 0.82; 'pardon': 0.84 |
| X-IronPort-Anti-Spam-Filtered | true |
| X-IronPort-Anti-Spam-Result | AgsIAC5i1FWGuA9G/2dsb2JhbABdhDMBg0nEPAEBAQEBAYVYVSoMAgUWCwILAwIBAgFLDQgCiCqpZ49jkQSFO4EikiuBQwWVI2+LfohfkVImgUqCNYM7AQEB |
| Date | Wed, 19 Aug 2015 13:05:52 +0200 |
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.8.0 |
| MIME-Version | 1.0 |
| To | Pyton List <python-list@python.org> |
| Subject | Why the different parameter signatures to indicate blocking/timeouts. |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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.10.1439982421.28100.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1439982421 news.xs4all.nl 23855 [2001:888:2000:d::a6]:53807 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Bytes | 2994 |
| X-Received-Body-CRC | 1402830970 |
| Xref | csiph.com comp.lang.python:95483 |
Show key headers only | View raw
I have been looking through the threading module and I am a bit annoyed at the different signatures for indicating whether some calls should block or not and the timeout. On the one hand we have the acquire on locks with the following signature: def accquire(blocking=True, timeout=-1) On the other hand we have wait and join methods with this signature: def join(timeout=None). As far as I understand timeout=None is equivallent to: blocking=True, timeout=-1 timeout=NR is equivallent to: blocking=True, timeout=NR. timeout=0 is equivallent to: blocking=False, timeout=-1 which may be equivallent to : blocking=True, timeout=0 Can someone explain why these different signatures, or should I consider this a relict from the past? -- Antoon Pardon ////
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Why the different parameter signatures to indicate blocking/timeouts. Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2015-08-19 13:05 +0200
csiph-web