Use only a single global lock for multiproc. (#167) · pythonAI/client_python@cc852a9 · GitHub
Skip to content

Commit cc852a9

Browse files
authored
Use only a single global lock for multiproc. (prometheus#167)
This cuts ~350ns off the time for an operation, bringing it to ~1700ns. In multi process mode it's a reasonable assumption that there isn't any threading going on, so a single lock is faster than more granular locks.
1 parent 831023e commit cc852a9

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

prometheus_client/core.py

Lines changed: 15 additions & 13 deletions

0 commit comments

Comments
 (0)