I’m using the Python API within a Tornado server. In order to prevent blocking the server’s IO loop, I’ve been adding a callback to futures in order to set the result on a coroutine-friendly future. For example,
tornado_future = TornadoFuture() callback = lambda fdb_future: handle_result(fdb_future, tornado_future) commit_future = tr.commit() commit_future.on_ready(callback) yield tornado_future
This seems to work well for gets and commits, but I don’t see a way with the public API to get a future for a range query operation. The
_get_range method that
get_range uses seems to be the kind of thing I’m looking for, but I’m hesitant to use an undocumented method that could change later.
Am I missing a more appropriate method that would work for my use case? If not, would it be reasonable to expose something like what
_get_range does as a public API method?