projects:hpx:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| projects:hpx:start [2020/05/29 01:14] – agaev | projects:hpx:start [2020/06/08 10:30] (current) – agaev | ||
|---|---|---|---|
| Line 62: | Line 62: | ||
| Дополнительные вещи, не из стандарта: | Дополнительные вещи, не из стандарта: | ||
| + | |||
| hazptr_array< | hazptr_array< | ||
| + | |||
| hazptr_local< | hazptr_local< | ||
| Line 109: | Line 111: | ||
| ====== Аргумент против standard proposal(Hooks) ====== | ====== Аргумент против standard proposal(Hooks) ====== | ||
| [[https:// | [[https:// | ||
| + | |||
| В стандарте сейчас используется что-то похожее на base_hook | В стандарте сейчас используется что-то похожее на base_hook | ||
| + | |||
| В Boost.Intrusive говорится(И это и есть аргумент): | В Boost.Intrusive говорится(И это и есть аргумент): | ||
| - | Sometimes an ' | + | Sometimes an ' |
| + | In this case, using a member hook as a data member instead of ' | ||
| А потом ещё и | А потом ещё и | ||
| - | A programmer might find that base or member hooks are not flexible enough in some situations. In some applications it would be optimal to put a hook deep inside a member of a class or just outside the class. Boost.Intrusive has an easy option to allow such cases: function_hook. | + | A programmer might find that base or member hooks are not flexible enough in some situations. |
| + | In some applications it would be optimal to put a hook deep inside a member of a class or just outside the class. | ||
| + | Boost.Intrusive has an easy option to allow such cases: function_hook. | ||
| ===== Как можно исправить ===== | ===== Как можно исправить ===== | ||
| Line 166: | Line 173: | ||
| В массиве HP в libcds хранится каст к void*. В proposal' | В массиве HP в libcds хранится каст к void*. В proposal' | ||
| + | |||
| Моя идея в том, чтобы как и в Boost.Intrusive, | Моя идея в том, чтобы как и в Boost.Intrusive, | ||
| Line 174: | Line 182: | ||
| Мои варианты: | Мои варианты: | ||
| Function hook решает эту проблему. | Function hook решает эту проблему. | ||
| + | |||
| + | ===== Альтернативные варианты ==== | ||
| + | |||
| + | Наша задача, | ||
| + | |||
| + | В protect мы кладём какой-то указатель, | ||
| + | |||
| + | Сейчас это isDefendedBy == isSame для libcds, и static_cast< | ||
| + | |||
| + | Это позволит делать улучшенную логику. К примеру, | ||
| + | |||
| + | ====== Is HP obsolete? ====== | ||
| + | |||
| + | Hazard eras: http:// | ||
| + | |||
| + | Wait free eras: https:// | ||
projects/hpx/start.1590704083.txt.gz · Last modified: 2020/05/29 01:14 by agaev