내가 두 개의 프로세스가 있습니다MacOSX에서는 C++에서 스핀 록없이 공유 메모리를 통해 프로세스 간 통신을 수행하는 방법은 무엇입니까?
Producer
and
Consumer
그들이 지금
Memory
메모리
의 일반적 mmaped 공유 영역을 가지고, 생산자는 메모리에 물건을 씁니다. 소비자는 메모리에서 물건을 읽습니다.I would prefer Consumer not to spin wait with Memory is empty.
I would prefer Producer not to spin wait when Memory is full.
어떻게하면됩니까?