Skip to content

[1.6.2] Typespecs fixes

Latest

Choose a tag to compare

@general-CbIC general-CbIC released this 19 Apr 11:37
· 17 commits to develop since this release

What's changed

Fixed

  • Fixed typespecs in Poolex.Private.State.t/0:
    • Introduced public Poolex.Private.State.monotonic_time/0 type and replaced incorrect Time.t() with it for the idle_overflowed_workers_last_touches field, which stores System.monotonic_time(:millisecond) values.
  • Fixed typespecs in Poolex.Private.DebugInfo.t/0:
    • Added missing idle_overflowed_workers_count, idle_overflowed_workers_impl, and idle_overflowed_workers_pids fields that were present in the struct and returned by get_debug_info/1 but absent from the type.
    • Corrected the waiting_callers field type from list(pid()) to list(Poolex.Caller.t()).

Changed

  • Refactored internal available_to_add_count/2 and available_to_remove_count/2 functions to return {allowed, skipped} tuples instead of just allowed, improving clarity of the min/max pool size enforcement logic.