Does the use of an anonymous pipe introduce a memory barrier for interthread communication?

Viewed 409

For example, say I allocate a struct with new and write the pointer into the write end of an anonymous pipe.

If I read the pointer from the corresponding read end, am I guaranteed to see the 'correct' contents on the struct?

Also of of interest is whether the results of socketpair() on unix & self connecting over tcp loopback on windows have the same guarantees.

The context is a server design which centralizes event dispatch with select/epoll

6 Answers
Related