* The 'rados create <objectname> [category]' optional category argument is no
longer supported or recognized.
+
+* rados.py's Rados class no longer has a __del__ method; it was causing
+ problems on interpreter shutdown and use of threads. If your code has
+ Rados objects with limited lifetimes and you're concerned about locked
+ resources, call Rados.shutdown() explicitly.
def shutdown(self):
"""
- Disconnects from the cluster.
+ Disconnects from the cluster. Call this explicitly when a
+ Rados.connect()ed object is no longer used.
"""
if (self.__dict__.has_key("state") and self.state != "shutdown"):
run_in_thread(self.librados.rados_shutdown, (self.cluster,))
self.shutdown()
return False
- def __del__(self):
- self.shutdown()
-
def version(self):
"""
Get the version number of the ``librados`` C library.
def connect(self, timeout=0):
"""
- Connect to the cluster.
+ Connect to the cluster. Use shutdown() to release resources.
"""
self.require_state("configuring")
ret = run_in_thread(self.librados.rados_connect, (self.cluster,),