I see below code in interprocess_condition, I know that interprocess_condition is used for process synchronization, but I am not sure whether spin_condition can be.
private:
#if defined(BOOST_INTERPROCESS_CONDITION_USE_POSIX)
ipcdetail::posix_condition m_condition;
#elif defined(BOOST_INTERPROCESS_CONDITION_USE_WINAPI)
ipcdetail::winapi_condition m_condition;
#else
ipcdetail::spin_condition m_condition; // this condition
#endif
doubt
Because I found that the spin_condition is implemented through the volatile keyword variable. Can volatile keyword variables be used as shared memory between processes?
spin_mutex m_enter_mut;
volatile boost::uint32_t m_command;
volatile boost::uint32_t m_num_waiters;