Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


projects:hpx:start

This is an old revision of the document!


Доработки библиотеки hpx

Вырастает из темы: Доработки hpx

p0233 – 2017-10-15 HP

p0566 – 2018-05-06 Proposed wording HP and RCU

p1121 – 2019-01-20 Proposed wording and interface for HP

folly – Реализация, приближенная к p0566. Использует части библиотеки folly(SingletonThreadLocal, SingletonManager, folly:Executor).

libcds – Другая реализация HP.

folly умеет использовать не только thread_local, libcds использует только thread_local storage.

В p0233 написано “Due to the performance advantages of using TLS, the library implementation should allow the programmer to choose implementation paths that benefit from TLS when suitable, and avoid TLS when incompatible with the use case.”

libcds:

  cds::Initialize();
  cds::gc::HP hpGC;
  cds::threading::Manager::attachThread();

http://libcds.sourceforge.net/doc/cds-api/index.html#cds_how_to_use

class HP – главный класс, Before use any HP-related class you must initialize \p %HP by contructing \p %cds::gc::HP object in beginning of your \p main().

class Guard – A guard is a hazard pointer. Additionally, the Guard class manages allocation and deallocation of the hazard pointer.

Guard::protect()

projects/hpx/start.1589453299.txt.gz · Last modified: 2020/05/14 13:48 by agaev