Commit Graph

1 Commits

Author SHA1 Message Date
LIU Yulong
975143fd08 Add a generic coordination lock mechanism
For various synchronized scenarios, this decorator
allows flexible lock name with parameters and names
of underlying functions.
For instance:
    @synchronized('{f_name}-{resource.id}-{snap[name]}')
    def foo(self, resource, snap):

Change-Id: I4bf75be2902cd598a5a5a2c5887d4b4262f3e042
Related-Bug: #1824911
2019-06-06 09:56:58 +08:00