« Previous | Next » 

Revision a95fd5d7

IDa95fd5d733f4db65a0c9a0777feecdfdb931f1f1
Parent d6646186
Child 00ce8b29

Added by Guido Trotter over 14 years ago

Add the delete() operation to SharedLock

This new operation lets a lock be cleanly deleted. The lock will be exclusively
held before deletion, and after it pending and future acquires will raise an
exception. Other SharedLock operations are modify to deal with delete() and to
avoid code duplication.

This patch also adds unit testing for the new function and its interaction with
the other lock features. The helper threads are sligtly modified to handle and
report the condition of a deleted lock. As a bonus a non-related unit test
about not supporting non-blocking mode yet has been added as well.

This feature will be used by the LockSet in order to support deadlock-free
delete of resources. This in turn will be useful to gracefully handle the
removal of instances and nodes from the cluster dealing with the fact that
other operations may be pending on them.

Reviewed-by: iustinp

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences