c++ - Does the use of an anonymous pipe introduce a memory barrier for interthread communication? -
for example, allocate struct new , write pointer write end of anonymous pipe.
if read pointer corresponding read end, guaranteed see 'correct' contents on struct?
also of of interest whether results of socketpair() on unix & self connecting on tcp loopback on windows have same guarantees.
the context server design centralizes event dispatch select/epoll
for example, allocate struct new , write pointer write end of anonymous pipe.
if read pointer corresponding read end, guaranteed see 'correct' contents on struct?
no. there no guarantee writing cpu have flushed write out of cache , made visible other cpu might read.
also of of interest whether results of socketpair() on unix & self connecting on tcp loopback on windows have same guarantees.
no.
Comments
Post a Comment