summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/src/jsonrpc/GCThreadContext.cpp
blob: 8b68d329c9ef0892019ddb6a56764c7d69084eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "LibLsp/JsonRpc/GCThreadContext.h"
#include <iostream>

GCThreadContext::GCThreadContext()
{
#ifdef LSPCPP_USEGC
    GC_get_stack_base(&gsb);
    GC_register_my_thread(&gsb);
#endif
}

GCThreadContext::~GCThreadContext()
{
#ifdef LSPCPP_USEGC
    GC_unregister_my_thread();
#endif
}