punchbowl.auto.control.cache_layer.manager#
Attributes#
Classes#
Allows shared memory buffers to be yielded without "leaking" a reference |
Functions#
|
|
|
|
|
|
Module Contents#
- punchbowl.auto.control.cache_layer.manager.CACHE_KEY_PREFIX = 'punchpipe-cache-'#
- class punchbowl.auto.control.cache_layer.manager.ExportableWrapper(buffer)[source]#
Allows shared memory buffers to be yielded without “leaking” a reference
If try_read_from_key just does yield shm.buf, then the calling function will still have a reference to our shared memory buffer when we enter our finally block and try to close the memory. By instead yielding this wrapper, we can invalidate its reference to the shared memory and close it.
- data#
- punchbowl.auto.control.cache_layer.manager.try_read_from_key(key) ExportableWrapper | None[source]#