def shareObject(self, obj, name=None, doref=False):
"""
Share an object in this cobra server. By specifying
doref=True you will let CobraProxy objects decide that
the object is done and should be un-shared. Also, if
name == None a random name is chosen.
Returns: name (or the newly generated random one)
"""
refcnt = None
if doref:
refcnt = 0
if name == None:
raise Exception("You must specify an object name to share!")
self.shared[name] = obj
if doref:
raise Exception("CobraHttp doesnt do refcnt")
return name
评论列表
文章目录