MCPcopy Index your code
hub / github.com/python/cpython / incref

Method incref

Lib/multiprocessing/managers.py:427–442  ·  view source on GitHub ↗
(self, c, ident)

Source from the content-addressed store, hash-verified

425 self.serve_client(c)
426
427 def incref(self, c, ident):
428 with self.mutex:
429 try:
430 self.id_to_refcount[ident] += 1
431 except KeyError as ke:
432 # If no external references exist but an internal (to the
433 # manager) still does and a new external reference is created
434 # from it, restore the manager's tracking of it from the
435 # previously stashed internal ref.
436 if ident in self.id_to_local_proxy_obj:
437 self.id_to_refcount[ident] = 1
438 self.id_to_obj[ident] = \
439 self.id_to_local_proxy_obj[ident]
440 util.debug('Server re-enabled tracking & INCREF %r', ident)
441 else:
442 raise ke
443
444 def decref(self, c, ident):
445 if ident not in self.id_to_refcount and \

Callers 3

createMethod · 0.95
get_refcount_helpersMethod · 0.80
__new__Method · 0.80

Calls 1

debugMethod · 0.45

Tested by 1

get_refcount_helpersMethod · 0.64