[Python-ideas] Thread-safe generators

Guido van Rossum gvanrossum at gmail.com
Sat Apr 15 11:05:28 EDT 2017


My 2 cent's worth, don't even think about it.

On Apr 15, 2017 3:27 AM, "Serhiy Storchaka" <storchaka at gmail.com> wrote:

> On 15.04.17 11:55, Stephen J. Turnbull wrote:
>
>> Serhiy Storchaka writes:
>>
>>  > The first thread just sets the running flag (as in current code). Due
>> to
>>  > GIL this doesn't need additional synchronization.
>>
>> Can we assume this lack of additional synchronization for other
>> implementations?  If not, do we care?
>>
>
> Other implementations should have atomic test-and-set operations for the
> running flag. Or other ways to prevent a race condition. So yes, we can
> assume this.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170415/a3ee7981/attachment.html>


More information about the Python-ideas mailing list