Skip to content

Using Tervel

Neil Moore edited this page Mar 19, 2017 · 4 revisions

This page and its subpages will be dedicated to documenting best practices when using Tervel, the wait-free concurrent data structure framework that OpenMemDB uses internally.

General

  • Every thread that accesses a Tervel data structure must create a Tervel thread context and register it with a Tervel object.
  • The general Tervel object must be initialized with the total number of threads that would be registered with it. Going beyond that value will trigger an assertion.

Vector

  • Make sure that pop_back_only() and push_back_only() can not ever be called at the same time in different threads.

    • Reason: (???)

Hash Map

  • The key type must be the same as the hash of that type. (This may change, future work may change this).

Queue

  • Not typically provided with Tervel
Clone this wiki locally