mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 19:25:51 +08:00
Boost.Interprocess hack for Windows (#202)
This commit is contained in:
+13
@@ -215,3 +215,16 @@ MemorySegmentPool::~MemorySegmentPool() {
|
||||
bip::shared_memory_object::remove(segment_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
namespace boost {
|
||||
namespace interprocess {
|
||||
namespace ipcdetail {
|
||||
windows_bootstamp windows_intermodule_singleton<windows_bootstamp>::get() {
|
||||
// HACK: Only do this for Windows as there seems to be no better workaround. Possibly undefined behavior!
|
||||
return reinterpret_cast<windows_bootstamp const &>(std::string("BOOTSTAMP"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,23 @@
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
namespace boost {
|
||||
namespace interprocess {
|
||||
namespace ipcdetail {
|
||||
template<typename C, bool LazyInit = true, bool Phoenix = false>
|
||||
class windows_intermodule_singleton;
|
||||
struct windows_bootstamp;
|
||||
template<>
|
||||
class windows_intermodule_singleton<windows_bootstamp> {
|
||||
public:
|
||||
static windows_bootstamp get();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <boost/interprocess/managed_shared_memory.hpp>
|
||||
|
||||
#include <arrow/api.h>
|
||||
|
||||
Reference in New Issue
Block a user