MCPcopy Create free account
hub / github.com/apple/foundationdb / wait

Method wait

bindings/python/fdb/impl.py:751–763  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

749
750class FutureKeyValueArray(Future):
751 def wait(self):
752 self.block_until_ready()
753 kvs = ctypes.pointer(KeyValueStruct())
754 count = ctypes.c_int()
755 more = ctypes.c_int()
756 self.capi.fdb_future_get_keyvalue_array(self.fpointer, ctypes.byref(kvs), ctypes.byref(count), ctypes.byref(more))
757 return ([KeyValue(ctypes.string_at(x.key, x.key_length), ctypes.string_at(x.value, x.value_length))
758 for x in kvs[0:count.value]], count.value, more.value)
759
760 # Logically, we should self._release_memory() after extracting the
761 # KVs but before returning, but then we would have to store
762 # the KVs on the python side and in most cases we are about to
763 # destroy the future anyway
764
765class FutureKeyArray(Future):
766 def wait(self):

Callers

nothing calls this directly

Calls 3

KeyValueStructClass · 0.70
KeyValueClass · 0.70
block_until_readyMethod · 0.45

Tested by

no test coverage detected