Try to fix libcds counters issues

* For unknown reasons, _cdslib::_thread_counter is never initialized,
  trigger initialization manually by referencing during MemoryPool's
  construction.
* CircleCI linux.gcc test crashes on exit with an "invalid delete" at
  hpGC.reset() in libcds.cpp. I don't know what causes this, but it
  turns out we don't need garbage collection currently (we only use
  VyukovMPMCCycleQueue), so we can just remove the garbage collection
  for now.
This commit is contained in:
Lukas W
2020-05-11 17:11:11 +02:00
parent 78c92e8314
commit 5ae42cafc4
3 changed files with 11 additions and 8 deletions

View File

@@ -17,5 +17,7 @@ namespace _cdslib
void thread_deinit();
static NiftyCounter<init, deinit> _counter;
static NiftyCounterTL<thread_init, thread_deinit> _thread_counter;
static thread_local NiftyCounterTL<_cdslib::thread_init, _cdslib::thread_deinit> _thread_counter;
}
#define CDS_THREAD_GUARD() (void)_cdslib::_thread_counter;