aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/serialise.hh
diff options
context:
space:
mode:
authorYorick van Pelt <yorick@yorickvanpelt.nl>2023-02-03 17:50:01 +0100
committerYorick van Pelt <yorick@yorickvanpelt.nl>2023-03-01 13:55:41 +0100
commiteaeb994d8b9d2152e076897bf430c8ac205d3d1a (patch)
tree48394e491b460ef1946c1d4075c46bbf77300cf8 /src/libutil/serialise.hh
parent0fd8f542a8ddb303f589ff6ca3343f36e3a783c0 (diff)
Disable GC inside coroutines on mac OS
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r--src/libutil/serialise.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index 7da5b07fd..fb1f14a3b 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -501,4 +501,14 @@ struct StackAllocator {
static StackAllocator *defaultAllocator;
};
+/* Disabling GC when entering a coroutine (on macos).
+ ::create is to avoid boehm gc dependency in libutil.
+ */
+class DisableGC {
+public:
+ DisableGC() {};
+ virtual ~DisableGC() {};
+ static std::shared_ptr<DisableGC> (*create)();
+};
+
}