mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Added comment describing usage.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
a640b7c2dd
commit
3ad90d3df7
1 file changed
+12
@@ -13,6 +13,18 @@ from xen.xend.XendLogging import log
|
||||
|
||||
class xswatch:
|
||||
|
||||
##
|
||||
# Create a watch on the given path in the store. The watch will fire
|
||||
# immediately, then subsequently each time the watched path is changed,
|
||||
# until the watch is deregistered, either by the return value from the
|
||||
# watch callback being False, or by an explicit call to unwatch.
|
||||
#
|
||||
# @param fn The function to be called when the watch fires. This function
|
||||
# should take the path that has changed as its first argument, followed by
|
||||
# the extra arguments given to this constructor, if any. It should return
|
||||
# True if the watch is to remain registered, or False if it is to be
|
||||
# deregistered.
|
||||
#
|
||||
def __init__(self, path, fn, *args, **kwargs):
|
||||
self.path = path
|
||||
self.fn = fn
|
||||
|
||||