[issue25343] Document atomic operations on builtin types

2020-09-11 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, I was asking where to put the disclaimer. The thread docs would be approriate if there is nothing already. Guido has been very reluctant to put any performance guarantees in the language reference. I believe he said that O(f(n)) info even for CPython sh

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray
R. David Murray added the comment: I think you are correct, and I wouldn't be surprised if there is some in the stdlib as well. -- ___ Python tracker ___ ___

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Dima Tisnek
Dima Tisnek added the comment: To clarify, Python language disclaimer can be in the general atomic operations or multithreading section. What I'd really like to see is documented, practical CPython and stdlib behaviour. I'm under the impression that there's quite a bit of code out there that

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray
R. David Murray added the comment: I think what Terry was asking was, where would you expect to see the disclaimer that *no* operations are guaranteed to be atomic? That's what we're inclining toward (though we'll probably need a signoff from Guido). -- __

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Dima Tisnek
Dima Tisnek added the comment: Ideally I'd like 2 sources: 1. a whole section on atomic operations in language and CPython implementation 2. annotation of standard library methods, e.g.: set().add(element) [atomic] or [CPython: atomic(*)] (*) assuming basic types, note about what custom method

[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: This question has been asked multiple times before. I think it should be documented that as far as the language goes, there is no answer. Raymond's answer is a start. Dima, where would you expect to find such a disclaimer (other than in the FAQ)? -

[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: > what set() operations are atomic? The language doesn't make any guarantees about set operation atomicity. Different implementations such as PyPy, Jython, and IronPython are free to make different choices than CPython. In general, users should make no as

[issue25343] Document atomic operations on builtin types

2015-10-08 Thread R. David Murray
R. David Murray added the comment: I wonder...personally I prefer to program in asyncio style rather than threading style, where one doesn't have to worry about atomicity. Maybe Python shouldn't make any atomicity guarantees. -- nosy: +r.david.murray _

[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Brett Cannon
Brett Cannon added the comment: We actually don't have any guarantees written down because we have never formalized them. It was discussed at the PyCon language summit this past year -- https://lwn.net/Articles/640177/ -- but it didn't lead to anyone writing a proposal to formalize the memory

[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Dima Tisnek
New submission from Dima Tisnek: Please document what builtin type operations are actually atomic. For example, what set() operations are atomic? (There are some blogs / tutorials online, but information is outdated and not authoritative) -- messages: 252545 nosy: Dima.Tisnek priority:

[issue25343] Document atomic operations on builtin types

2015-10-08 Thread Dima Tisnek
Changes by Dima Tisnek : -- assignee: -> docs@python components: +Documentation nosy: +docs@python type: -> enhancement ___ Python tracker ___ _