Skip to content

Removed and replaced SHM-jemalloc Arena::construct<T>(bool use_cache, ...) overload API due to potential overload ambiguity for some Ts. / Ipc_arena public super-class Shm_pool_collection also has a construct() with potentially ambiguous signature; renamed to construct_maybe_thread_cached(). / Comment and/or doc changes.#131

Merged
ygoldfeld merged 3 commits intomainfrom
tkt-isal-56_shm-jem-ambiguous-ct-api
Feb 7, 2025

Conversation

@ygoldfeld
Copy link
Contributor

fixes Flow-IPC/ipc_shm_arena_lend#56

API notes (ATTN when writing release notes):

  • New APIs:
    • ipc::shm::arena_lend::jemalloc::Ipc_arena::construct_thread_cached(): replaces removed construct(true, ...).
    • ipc::shm::arena_lend::jemalloc::Shm_pool_collection::construct_maybe_thread_cached(): replaces removed construct().
  • Breaking changes:
    • Removed ipc::shm::arena_lend::jemalloc::Ipc_arena::construct(bool use_cache).
      • For use_cache = true, call construct_thread_cached() (new).
      • For use_cache = false, call construct(Ctor_args&&... args).
    • Renamed ipc::shm::arena_lend::jemalloc::Shm_pool_collection::construct() to maybe_thread_caching().

Impl notes:

  • construct(bool, ...) has become private construct_impl(); construct(args...) continues to call construct_impl(false, ...), as it was calling the deleted overload before. New API construct_thread_cached() calls construct_impl(true, ...).

To code reviewer:

Forgoing code review, as the change is in ipc_shm_arena_lend repo (submodule) and has been reviewed/merged.

…/ Removed and replaced SHM-jemalloc `Arena::construct<T>(bool use_cache, ...)` overload API due to potential overload ambiguity for some `T`s. (Impl: It has become private `construct_impl()`; `construct(args...)` continues to call `construct_impl(false, ...)`, as it was calling the deleted overload before. New API `construct_thread_cached()` calls `construct_impl(true, ...)`.)
…ass also has a construct() with potentially ambiguous signature; renamed to construct_maybe_thread_cached().>
@ygoldfeld ygoldfeld self-assigned this Feb 6, 2025
@ygoldfeld ygoldfeld merged commit 3d2f8a1 into main Feb 7, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SHM-jemalloc: arena construct<T>(ctor_args...) and construct<T>(bool, ctor_args...) = ambiguous for some T ctors; rejigger overloads to resolve.

1 participant