From 953d15b67dbacd9915518db76b25427ad9020fd5 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 16 Dec 2021 11:46:11 -0500 Subject: [PATCH] Add nooz --- newsfragments/257.feature.rst | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 newsfragments/257.feature.rst diff --git a/newsfragments/257.feature.rst b/newsfragments/257.feature.rst new file mode 100644 index 0000000..1183632 --- /dev/null +++ b/newsfragments/257.feature.rst @@ -0,0 +1,9 @@ +Add ``trionics.maybe_open_context()`` an actor-scoped async multi-task +context manager resource caching API. + +Adds an SC-safe cacheing async context manager api that only enters on +the *first* task entry and only exits on the *last* task exit while in +between delivering the same cached value per input key. Keys can be +either an explicit ``key`` named arg provided by the user or a +hashable ``kwargs`` dict (will be converted to a ``list[tuple]``) which +is passed to the underlying manager function as input.