@@ -951,6 +951,16 @@ Glossary
951951 to locks exist such as queues, producer/consumer patterns, and
952952 thread-local state. See also :term: `deadlock `, and :term: `reentrant `.
953953
954+ lock-free
955+ An operation that does not acquire any :term: `lock ` and uses atomic CPU
956+ instructions to ensure correctness. Lock-free operations can execute
957+ concurrently without blocking each other and cannot be blocked by
958+ operations that hold locks. In :term: `free-threaded <free threading> `
959+ Python, built-in types like :class: `dict ` and :class: `list ` provide
960+ lock-free read operations, which means other threads may observe
961+ intermediate states during multi-step modifications even when those
962+ modifications hold the :term: `per-object lock `.
963+
954964 loader
955965 An object that loads a module.
956966 It must define the :meth: `!exec_module ` and :meth: `!create_module ` methods
@@ -1217,6 +1227,16 @@ Glossary
12171227 <faq-argument-vs-parameter>`, the :class: `inspect.Parameter ` class, the
12181228 :ref: `function ` section, and :pep: `362 `.
12191229
1230+ per-object lock
1231+ A :term: `lock ` associated with an individual object instance rather than
1232+ a global lock shared across all objects. In :term: `free-threaded
1233+ <free threading> ` Python, built-in types like :class: `dict ` and
1234+ :class: `list ` use per-object locks to allow concurrent operations on
1235+ different objects while serializing operations on the same object.
1236+ Operations that hold the per-object lock prevent other locking operations
1237+ on the same object from proceeding, but do not block :term: `lock-free `
1238+ operations.
1239+
12201240 path entry
12211241 A single location on the :term: `import path ` which the :term: `path
12221242 based finder ` consults to find modules for importing.
0 commit comments