БГ
Size: a a a
БГ
R3
БГ
R3
БГ

БГ
R3
R3
G
IB

БГ
R3
R3
IA
class IdGenerator(object):
def __init__(self, db_conn, table, column):
self._lock = threading.Lock()
self._next_id = _load_current_id(db_conn, table, column)
def get_next(self):
with self._lock:
self._next_id += 1
return self._next_id
IA
R3
IA