]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
Throttle: add a simpler throttle that just blocks above a threshold
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 6 May 2013 23:51:12 +0000 (16:51 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Fri, 10 May 2013 19:00:11 +0000 (12:00 -0700)
commit537386d906b8c0e395433461dcb03a82eb33f34f
tree3e0e4d0a52fa6a66326ebeb4182dcfa7400ad53b
parentc5d430248992f8636b8ef075db7ff470ecc7e266
Throttle: add a simpler throttle that just blocks above a threshold

This is convenient to use to turn synchronous calls into asynchronous
calls with a limited number of operations in flight concurrently.
It assumes the caller will wait for all operations to complete at the
end.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/common/Throttle.cc
src/common/Throttle.h