]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
monc: let users specify a callback when they reopen their monitor session
authorGreg Farnum <greg@inktank.com>
Wed, 12 Feb 2014 01:53:56 +0000 (17:53 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 13 Feb 2014 21:20:52 +0000 (13:20 -0800)
commit1a8c43474bf36bfcf2a94bf9b7e756a2a99f33fd
tree8c1988a28e6743af3830e488ba98bc1c51bccd4a
parent0ae5e53e8bd5101c606617fd6cd4a88997c9a0d4
monc: let users specify a callback when they reopen their monitor session

Then the callback is triggered when a new session is established, and the
daemon can do whatever it likes. There are no guarantees about how long it
might take to trigger, though. In particular we call the provided callback
while not holding our own lock in order to avoid deadlock. This could lead
to some funny ordering from the user's perspective if they call
reopen_session() again before getting the callback, but there's no way around
that, so they just have to use it appropriately.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/mon/MonClient.cc
src/mon/MonClient.h