[Python-ideas] Async API: some code to review
Cesare Di Mauro
cesare.di.mauro at gmail.com
Mon Oct 29 18:02:09 CET 2012
2012/10/29 Mark Hackett <mark.hackett at metoffice.gov.uk>
> On Monday 29 Oct 2012, Richard Oudkerk wrote:
> > Writing (short messages) to a pipe also
> > has atomic guarantees that can make having multiple writers perfectly
> > reasonable.
> >
> > --
> > Richard
> >
> > _______________________________________________
> > Python-ideas mailing list
> > Python-ideas at python.org
> > http://mail.python.org/mailman/listinfo/python-ideas
> >
>
> Is that actually true? It may be guaranteed on Intel x86 compatibles and
> Linux
> (because of the string operations available in the x86 instruction set),
> but I
> don't thing anything other than an IPC message has a "you can write a
> string
> atomically" guarantee. And I may be misremembering that.
>
x86 and x64 string operations aren't atomic. Only a few, selected,
instructions can be LOCK prefixed (XCHG is the only one that doesn't
require it, since it's always locked) to ensure an atomic RMW memory
operation.
Regards,
Cesare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121029/5456326f/attachment.html>
More information about the Python-ideas
mailing list