f d dl mZ d dlZd dlmZ ddlmZmZ G d de Z ej
fdZd Z e Z
dS )
)unicode_literalsN)Lock )mmap_key
MmapedDictc . e Zd ZdZdZd Zd Zd Zd ZdS )
MutexValuezA float protected by a mutex.Fc : d| _ t | _ d S )Ng )_valuer _lock)selftypmetric_namename
labelnameslabelvalueskwargss j/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/prometheus_client/values.py__init__zMutexValue.__init__ s VV
c f | j 5 | xj |z
c_ d d d d S # 1 swxY w Y d S Nr r )r
amounts r inczMutexValue.inc s~
Z " "KK6!KK " " " " " " " " " " " " " " " " " "s &**c T | j 5 || _ d d d d S # 1 swxY w Y d S r r )r
values r setzMutexValue.set su
Z DK s !!c R | j 5 | j cd d d S # 1 swxY w Y d S r r )r
s r getzMutexValue.get ss
Z ; s N) __name__
__module____qualname____doc__
_multiprocessr r r r r r r r s[ ''M " " " r r c ~ i g d it G fddt }|S )a8 Returns a MmapedValue class based on a process_identifier function.
The 'process_identifier' function MUST comply with this simple rule:
when called in simultaneously running processes it MUST return distinct values.
Using a different function than the default 'os.getpid' is at your own risk.
r c ` e Zd ZdZdZdfd Z fdZ fdZfdZfdZ fd Z
d
S )&MultiProcessValue.